Example #1
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="placeholderResolver">Placeholder Resolver</param>
        /// <param name="defaultTemplateProvider">Default Template Provider</param>
        /// <param name="cachedDbAccess">Cached Db Access</param>
        /// <param name="languageKeyGenerator">Language Key Generator</param>
        /// <param name="languageKeyDbAccess">Language Key Db Access</param>
        /// <param name="taleDbAccess">Dialog Db Access</param>
        /// <param name="dialogParser">Dialog Parser</param>
        /// <param name="dialogFunctionGenerator">Dialog Function Generator</param>
        /// <param name="dialogRenderer">Dialog Renderer</param>
        /// <param name="legacyDailyRoutineEventPlaceholderResolver">Legacy daily routine event placeholder resolver</param>
        /// <param name="legacyDailyRoutineEventContentPlaceholderResolver">Legacy Daily routine event content placeholder resolver</param>
        /// <param name="dailyRoutineFunctionRenderer">Daily routine function renderer</param>
        /// <param name="nodeGraphExporter">Node Graph Exporter</param>
        /// <param name="snippetFunctionRenderer">Export Snippet Function renderer</param>
        /// <param name="localizerFactory">Localizer Factory</param>
        public LegacyExportTemplatePlaceholderRenderingEngine(IExportTemplatePlaceholderResolver placeholderResolver, ICachedExportDefaultTemplateProvider defaultTemplateProvider, IExportCachedDbAccess cachedDbAccess, ILanguageKeyGenerator languageKeyGenerator,
                                                              ILanguageKeyDbAccess languageKeyDbAccess, ITaleDbAccess taleDbAccess, IExportDialogParser dialogParser, IExportDialogFunctionGenerator dialogFunctionGenerator, IExportDialogRenderer dialogRenderer,
                                                              ILegacyDailyRoutineEventPlaceholderResolver legacyDailyRoutineEventPlaceholderResolver, ILegacyDailyRoutineEventContentPlaceholderResolver legacyDailyRoutineEventContentPlaceholderResolver,
                                                              IDailyRoutineFunctionRenderer dailyRoutineFunctionRenderer, INodeGraphExporter nodeGraphExporter, IExportSnippetFunctionRenderer snippetFunctionRenderer, IStringLocalizerFactory localizerFactory)
        {
            _localizerFactory = localizerFactory;

            dialogRenderer.SetExportTemplatePlaceholderResolver(placeholderResolver);

            _exportTemplatePlaceholderResolvers = new List <IExportTemplateTopicPlaceholderResolver>();

            // Order of exporting is determined by the order in which these are  added, thats why the order is important
            _exportTemplatePlaceholderResolvers.Add(new ExportSnippetTemplatePlaceholderResolver(snippetFunctionRenderer, defaultTemplateProvider, cachedDbAccess, languageKeyGenerator, localizerFactory));
            _exportTemplatePlaceholderResolvers.Add(new NpcInventoryExportTemplatePlaceholderResolver(defaultTemplateProvider, cachedDbAccess, languageKeyGenerator, localizerFactory));
            _exportTemplatePlaceholderResolvers.Add(new NpcSkillExportTemplatePlaceholderResolver(defaultTemplateProvider, cachedDbAccess, languageKeyGenerator, localizerFactory));
            _exportTemplatePlaceholderResolvers.Add(new NpcDailyRoutineExportPlaceholderResolver(defaultTemplateProvider, cachedDbAccess, legacyDailyRoutineEventPlaceholderResolver, legacyDailyRoutineEventContentPlaceholderResolver, dailyRoutineFunctionRenderer, languageKeyGenerator, localizerFactory));
            _exportTemplatePlaceholderResolvers.Add(new FlexFieldExportTemplatePlaceholderResolver(defaultTemplateProvider, cachedDbAccess, languageKeyGenerator, localizerFactory));
            _exportTemplatePlaceholderResolvers.Add(new DialogExportTemplatePlaceholderResolver(cachedDbAccess, languageKeyGenerator, taleDbAccess, dialogParser, dialogFunctionGenerator, dialogRenderer, defaultTemplateProvider, localizerFactory));
            _exportTemplatePlaceholderResolvers.Add(new LanguageKeyTemplatePlaceholderResolver(defaultTemplateProvider, cachedDbAccess, languageKeyDbAccess, localizerFactory));

            foreach (IExportTemplateTopicPlaceholderResolver curResolver in _exportTemplatePlaceholderResolvers)
            {
                curResolver.SetExportTemplatePlaceholderResolver(placeholderResolver);
            }
        }
Example #2
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="defaultTemplateProvider">Default Template Provider</param>
 /// <param name="cachedDbAccess">Cached Db Access</param>
 /// <param name="dailyRoutineEventPlaceholderResolver">Daily routine event placeholder resolver</param>
 /// <param name="languageKeyGenerator">Language Key Generator</param>
 /// <param name="localizerFactory">Localizer Factory</param>
 public DailyRoutineEventStateConditionResolver(ICachedExportDefaultTemplateProvider defaultTemplateProvider, IExportCachedDbAccess cachedDbAccess, ILegacyDailyRoutineEventPlaceholderResolver dailyRoutineEventPlaceholderResolver,
                                                ILanguageKeyGenerator languageKeyGenerator, IStringLocalizerFactory localizerFactory)
 {
     _cachedDbAccess = cachedDbAccess;
     _dailyRoutineEventPlaceholderResolver = dailyRoutineEventPlaceholderResolver;
     _flexFieldPlaceholderResolver         = new FlexFieldExportTemplatePlaceholderResolver(defaultTemplateProvider, cachedDbAccess, languageKeyGenerator, localizerFactory, NpcPlaceholderPrefix);
 }
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="defaultTemplateProvider">Default Template Provider</param>
 /// <param name="cachedDbAccess">Cached Db Access</param>
 /// <param name="languageKeyGenerator">Language Key Generator</param>
 /// <param name="scribanLanguageKeyGenerator">Scriban language key generator</param>
 /// <param name="conditionRenderer">Condition Renderer</param>
 /// <param name="legacyDailyRoutineEventPlaceholderResolver">Legacy Daily routine event placeholder resolver</param>
 /// <param name="dailyRoutineFunctionNameGenerator">Daily routine function name generator</param>
 /// <param name="actionTranslator">Action translator</param>
 /// <param name="nodeGraphParser">Node graph parser</param>
 /// <param name="nodeGraphFunctionGenerator">Node graph function generator</param>
 /// <param name="stringLocalizerFactory">String Localizer Factor</param>
 public ExportSnippetFunctionRenderer(ICachedExportDefaultTemplateProvider defaultTemplateProvider, IExportCachedDbAccess cachedDbAccess, ILanguageKeyGenerator languageKeyGenerator, IScribanLanguageKeyGenerator scribanLanguageKeyGenerator,
                                      IConditionRenderer conditionRenderer, ILegacyDailyRoutineEventPlaceholderResolver legacyDailyRoutineEventPlaceholderResolver, IDailyRoutineFunctionNameGenerator dailyRoutineFunctionNameGenerator,
                                      IActionTranslator actionTranslator, INodeGraphParser nodeGraphParser, IExportSnippetNodeGraphFunctionGenerator nodeGraphFunctionGenerator, IStringLocalizerFactory stringLocalizerFactory) :
     base(defaultTemplateProvider, cachedDbAccess, languageKeyGenerator, scribanLanguageKeyGenerator, conditionRenderer, legacyDailyRoutineEventPlaceholderResolver, dailyRoutineFunctionNameGenerator, actionTranslator, stringLocalizerFactory)
 {
     _nodeGraphParser            = nodeGraphParser;
     _nodeGraphFunctionGenerator = nodeGraphFunctionGenerator;
 }
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="defaultTemplateProvider">Default Template Provider</param>
 /// <param name="cachedDbAccess">Cached Db Access</param>
 /// <param name="legacyEventPlaceholderResolver">Legacy daily routine event placeholder resolver</param>
 /// <param name="eventContentPlaceholderResolver">Daily routine event content palceholder resolver</param>
 /// <param name="dailyRoutineFunctionRenderer">Daily routine function renderer</param>
 /// <param name="languageKeyGenerator">Language Key Generator</param>
 /// <param name="localizerFactory">Localizer Factory</param>
 public NpcDailyRoutineExportPlaceholderResolver(ICachedExportDefaultTemplateProvider defaultTemplateProvider, IExportCachedDbAccess cachedDbAccess, ILegacyDailyRoutineEventPlaceholderResolver legacyEventPlaceholderResolver,
                                                 ILegacyDailyRoutineEventContentPlaceholderResolver eventContentPlaceholderResolver, IDailyRoutineFunctionRenderer dailyRoutineFunctionRenderer, ILanguageKeyGenerator languageKeyGenerator,
                                                 IStringLocalizerFactory localizerFactory) : base(localizerFactory.Create(typeof(NpcDailyRoutineExportPlaceholderResolver)))
 {
     _defaultTemplateProvider         = defaultTemplateProvider;
     _cachedDbAccess                  = cachedDbAccess;
     _eventPlaceholderResolver        = legacyEventPlaceholderResolver;
     _eventContentPlaceholderResolver = eventContentPlaceholderResolver;
     _dailyRoutineFunctionRenderer    = dailyRoutineFunctionRenderer;
     _languageKeyGenerator            = languageKeyGenerator;
 }
Example #5
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="defaultTemplateProvider">Default Template Provider</param>
 /// <param name="cachedDbAccess">Cached Db Access</param>
 /// <param name="languageKeyGenerator">Language Key Generator</param>
 /// <param name="scribanLanguageKeyGenerator">Scriban language key generator</param>
 /// <param name="conditionRenderer">Condition Renderer</param>
 /// <param name="legacyDailyRoutineEventPlaceholderResolver">Daily routine event placeholder resolver</param>
 /// <param name="dailyRoutineFunctionNameGenerator">Daily routine function name generator</param>
 /// <param name="actionTranslator">Action translator</param>
 /// <param name="stringLocalizerFactory">String Localizer Factor</param>
 public NodeGraphBaseRenderer(ICachedExportDefaultTemplateProvider defaultTemplateProvider, IExportCachedDbAccess cachedDbAccess, ILanguageKeyGenerator languageKeyGenerator, IScribanLanguageKeyGenerator scribanLanguageKeyGenerator,
                              IConditionRenderer conditionRenderer, ILegacyDailyRoutineEventPlaceholderResolver legacyDailyRoutineEventPlaceholderResolver, IDailyRoutineFunctionNameGenerator dailyRoutineFunctionNameGenerator,
                              IActionTranslator actionTranslator, IStringLocalizerFactory stringLocalizerFactory)
 {
     _defaultTemplateProvider     = defaultTemplateProvider;
     _cachedDbAccess              = cachedDbAccess;
     _languageKeyGenerator        = languageKeyGenerator;
     _scribanLanguageKeyGenerator = scribanLanguageKeyGenerator;
     _conditionRenderer           = conditionRenderer;
     _legacyDailyRoutineEventPlaceholderResolver = legacyDailyRoutineEventPlaceholderResolver;
     _dailyRoutineFunctionNameGenerator          = dailyRoutineFunctionNameGenerator;
     _actionTranslator       = actionTranslator;
     _stringLocalizerFactory = stringLocalizerFactory;
     _errorCollection        = null;
     _stepRenderers          = new List <IExportDialogStepRenderer>();
 }
Example #6
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="defaultTemplateProvider">Default Template Provider</param>
        /// <param name="cachedDbAccess">Cached Db Access</param>
        /// <param name="languageKeyGenerator">Language Key Generator</param>
        /// <param name="languageKeyDbAccess">Language Key Db Access</param>
        /// <param name="scribanLanguageKeyGenerator">Scriban Language key generator</param>
        /// <param name="taleDbAccess">Dialog Db Access</param>
        /// <param name="dialogParser">Dialog Parser</param>
        /// <param name="dialogFunctionGenerator">Dialog Function Generator</param>
        /// <param name="dialogRenderer">Dialog Renderer</param>
        /// <param name="legacyDailyRoutineEventPlaceholderResolver">Legacy Daily routine event placeholder resolver</param>
        /// <param name="legacyDailyRoutineEventContentPlaceholderResolver">Legacy Daily routine event content placeholder resolver</param>
        /// <param name="dailyRoutineFunctionNameGenerator">Daily routine function name generator</param>
        /// <param name="dailyRoutineFunctionRenderer">Daily routine function renderer</param>
        /// <param name="nodeGraphExporter">Node Graph Exporter</param>
        /// <param name="exportSnippetFunctionRenderer">Export snippet function renderer</param>
        /// <param name="stateMachineFunctionNameGenerator">State machine function name generator</param>
        /// <param name="stateMachineFunctionRenderer">State machine function renderer</param>
        /// <param name="localizerFactory">Localizer Factory</param>
        public ExportTemplatePlaceholderResolver(ICachedExportDefaultTemplateProvider defaultTemplateProvider, IExportCachedDbAccess cachedDbAccess, ILanguageKeyGenerator languageKeyGenerator, IScribanLanguageKeyGenerator scribanLanguageKeyGenerator,
                                                 ILanguageKeyDbAccess languageKeyDbAccess, ITaleDbAccess taleDbAccess, IExportDialogParser dialogParser, IExportDialogFunctionGenerator dialogFunctionGenerator, IExportDialogRenderer dialogRenderer,
                                                 ILegacyDailyRoutineEventPlaceholderResolver legacyDailyRoutineEventPlaceholderResolver, ILegacyDailyRoutineEventContentPlaceholderResolver legacyDailyRoutineEventContentPlaceholderResolver,
                                                 IDailyRoutineFunctionNameGenerator dailyRoutineFunctionNameGenerator, IDailyRoutineFunctionRenderer dailyRoutineFunctionRenderer, INodeGraphExporter nodeGraphExporter,
                                                 IExportSnippetFunctionRenderer exportSnippetFunctionRenderer, IStateMachineFunctionNameGenerator stateMachineFunctionNameGenerator, IStateMachineFunctionRenderer stateMachineFunctionRenderer,
                                                 IStringLocalizerFactory localizerFactory)
        {
            dialogRenderer.SetExportTemplatePlaceholderResolver(this);

            _renderingEngine = new Dictionary <ExportTemplateRenderingEngine, IExportTemplatePlaceholderRenderingEngine>();
            _renderingEngine.Add(ExportTemplateRenderingEngine.Legacy, new LegacyExportTemplatePlaceholderRenderingEngine(this, defaultTemplateProvider, cachedDbAccess, languageKeyGenerator, languageKeyDbAccess, taleDbAccess, dialogParser,
                                                                                                                          dialogFunctionGenerator, dialogRenderer, legacyDailyRoutineEventPlaceholderResolver, legacyDailyRoutineEventContentPlaceholderResolver,
                                                                                                                          dailyRoutineFunctionRenderer, nodeGraphExporter, exportSnippetFunctionRenderer, localizerFactory));
            _renderingEngine.Add(ExportTemplateRenderingEngine.Scriban, new ScribanExportTemplatePlaceholderRenderingEngine(this, cachedDbAccess, taleDbAccess, defaultTemplateProvider, scribanLanguageKeyGenerator, dialogParser, dialogFunctionGenerator,
                                                                                                                            dialogRenderer, dailyRoutineFunctionNameGenerator, dailyRoutineFunctionRenderer, exportSnippetFunctionRenderer, stateMachineFunctionNameGenerator,
                                                                                                                            stateMachineFunctionRenderer, languageKeyDbAccess, localizerFactory));
        }
Example #7
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="errorCollection">Error Collection</param>
        /// <param name="defaultTemplateProvider">Default Template Provider</param>
        /// <param name="cachedDbAccess">Cached Db Access</param>
        /// <param name="legacyDailyRoutineEventPlaceholderResolver">Legacy daily routine event placeholder resolver</param>
        /// <param name="dailyRoutineFunctionNameGenerator">Daily routine function name generator</param>
        /// <param name="languageKeyGenerator">Language Key Generator</param>
        /// <param name="scribanLanguageKeyGenerator">Scriban language key generator</param>
        /// <param name="localizerFactory">Localizer Factory</param>
        /// <param name="actionTranslator">Action translator</param>
        /// <param name="exportSettings">Export Settings</param>
        /// <param name="project">Project</param>
        public ExportDialogActionRenderer(ExportPlaceholderErrorCollection errorCollection, ICachedExportDefaultTemplateProvider defaultTemplateProvider, IExportCachedDbAccess cachedDbAccess, ILegacyDailyRoutineEventPlaceholderResolver legacyDailyRoutineEventPlaceholderResolver,
                                          IDailyRoutineFunctionNameGenerator dailyRoutineFunctionNameGenerator, ILanguageKeyGenerator languageKeyGenerator, IScribanLanguageKeyGenerator scribanLanguageKeyGenerator, IStringLocalizerFactory localizerFactory,
                                          IActionTranslator actionTranslator, ExportSettings exportSettings, GoNorthProject project)
        {
            _errorCollection         = errorCollection;
            _defaultTemplateProvider = defaultTemplateProvider;
            _actionTranslator        = actionTranslator;
            _exportSettings          = exportSettings;
            _project   = project;
            _localizer = localizerFactory.Create(typeof(ExportDialogActionRenderer));

            _actionRenderes = new Dictionary <ActionType, ActionRendererDispatcher>();
            _actionRenderes.Add(ActionType.ChangePlayerValue, new ActionRendererDispatcher(TemplateType.TaleActionChangePlayerValue, defaultTemplateProvider,
                                                                                           new NpcValueChangeRenderer(defaultTemplateProvider, cachedDbAccess, languageKeyGenerator, localizerFactory, true),
                                                                                           new ScribanNpcValueChangeRenderer(defaultTemplateProvider, cachedDbAccess, scribanLanguageKeyGenerator, localizerFactory, true)));
            _actionRenderes.Add(ActionType.ChangeNpcValue, new ActionRendererDispatcher(TemplateType.TaleActionChangeNpcValue, defaultTemplateProvider,
                                                                                        new NpcValueChangeRenderer(defaultTemplateProvider, cachedDbAccess, languageKeyGenerator, localizerFactory, false),
                                                                                        new ScribanNpcValueChangeRenderer(defaultTemplateProvider, cachedDbAccess, scribanLanguageKeyGenerator, localizerFactory, false)));
            _actionRenderes.Add(ActionType.SpawnItemInPlayerInventory, new ActionRendererDispatcher(TemplateType.TaleActionSpawnItemForPlayer, defaultTemplateProvider,
                                                                                                    new InventoryActionRenderer(defaultTemplateProvider, cachedDbAccess, languageKeyGenerator, localizerFactory, true, false, false),
                                                                                                    new ScribanInventoryActionRenderer(cachedDbAccess, scribanLanguageKeyGenerator, localizerFactory, true, false, false)));
            _actionRenderes.Add(ActionType.TransferItemToPlayerInventory, new ActionRendererDispatcher(TemplateType.TaleActionTransferItemToPlayer, defaultTemplateProvider,
                                                                                                       new InventoryActionRenderer(defaultTemplateProvider, cachedDbAccess, languageKeyGenerator, localizerFactory, true, true, false),
                                                                                                       new ScribanInventoryActionRenderer(cachedDbAccess, scribanLanguageKeyGenerator, localizerFactory, true, true, false)));
            _actionRenderes.Add(ActionType.RemoveItemFromPlayerInventory, new ActionRendererDispatcher(TemplateType.TaleActionRemoveItemFromPlayer, defaultTemplateProvider,
                                                                                                       new InventoryActionRenderer(defaultTemplateProvider, cachedDbAccess, languageKeyGenerator, localizerFactory, true, false, true),
                                                                                                       new ScribanInventoryActionRenderer(cachedDbAccess, scribanLanguageKeyGenerator, localizerFactory, true, false, true)));
            _actionRenderes.Add(ActionType.SpawnItemInNpcInventory, new ActionRendererDispatcher(TemplateType.TaleActionSpawnItemForNpc, defaultTemplateProvider,
                                                                                                 new InventoryActionRenderer(defaultTemplateProvider, cachedDbAccess, languageKeyGenerator, localizerFactory, false, false, false),
                                                                                                 new ScribanInventoryActionRenderer(cachedDbAccess, scribanLanguageKeyGenerator, localizerFactory, false, false, false)));
            _actionRenderes.Add(ActionType.TransferItemToNpcInventory, new ActionRendererDispatcher(TemplateType.TaleActionTransferItemToNpc, defaultTemplateProvider,
                                                                                                    new InventoryActionRenderer(defaultTemplateProvider, cachedDbAccess, languageKeyGenerator, localizerFactory, false, true, false),
                                                                                                    new ScribanInventoryActionRenderer(cachedDbAccess, scribanLanguageKeyGenerator, localizerFactory, false, true, false)));
            _actionRenderes.Add(ActionType.RemoveItemFromNpcInventory, new ActionRendererDispatcher(TemplateType.TaleActionRemoveItemFromNpc, defaultTemplateProvider,
                                                                                                    new InventoryActionRenderer(defaultTemplateProvider, cachedDbAccess, languageKeyGenerator, localizerFactory, false, false, true),
                                                                                                    new ScribanInventoryActionRenderer(cachedDbAccess, scribanLanguageKeyGenerator, localizerFactory, false, false, true)));
            _actionRenderes.Add(ActionType.ChangeQuestValue, new ActionRendererDispatcher(TemplateType.TaleActionChangeQuestValue, defaultTemplateProvider,
                                                                                          new QuestValueChangeRenderer(defaultTemplateProvider, cachedDbAccess, languageKeyGenerator, localizerFactory),
                                                                                          new ScribanQuestValueChangeRenderer(defaultTemplateProvider, cachedDbAccess, scribanLanguageKeyGenerator, localizerFactory)));
            _actionRenderes.Add(ActionType.ChangeQuestState, new ActionRendererDispatcher(TemplateType.TaleActionSetQuestState, defaultTemplateProvider,
                                                                                          new SetQuestStateActionRenderer(defaultTemplateProvider, cachedDbAccess, languageKeyGenerator, localizerFactory),
                                                                                          new ScribanSetQuestStateActionRenderer(cachedDbAccess, scribanLanguageKeyGenerator, localizerFactory)));
            _actionRenderes.Add(ActionType.AddQuestText, new ActionRendererDispatcher(TemplateType.TaleActionAddQuestText, defaultTemplateProvider,
                                                                                      new AddQuestTextRenderer(defaultTemplateProvider, cachedDbAccess, languageKeyGenerator, localizerFactory),
                                                                                      new ScribanAddQuestTextActionRenderer(cachedDbAccess, scribanLanguageKeyGenerator, localizerFactory)));
            _actionRenderes.Add(ActionType.ChangeCurrentSkillValue, new ActionRendererDispatcher(TemplateType.TaleActionChangeCurrentSkillValue, defaultTemplateProvider,
                                                                                                 new CurrentSkillValueChangeRenderer(defaultTemplateProvider, cachedDbAccess, languageKeyGenerator, localizerFactory),
                                                                                                 new ScribanCurrentSkillValueChangeRenderer(defaultTemplateProvider, cachedDbAccess, scribanLanguageKeyGenerator, localizerFactory)));
            _actionRenderes.Add(ActionType.Wait, new ActionRendererDispatcher(TemplateType.TaleActionWait, defaultTemplateProvider,
                                                                              new WaitActionRenderer(localizerFactory),
                                                                              new ScribanWaitActionRenderer(cachedDbAccess, localizerFactory)));
            _actionRenderes.Add(ActionType.ChangePlayerState, new ActionRendererDispatcher(TemplateType.TaleActionSetPlayerState, defaultTemplateProvider,
                                                                                           new ChangeNpcStateActionRenderer(defaultTemplateProvider, cachedDbAccess, languageKeyGenerator, localizerFactory, true),
                                                                                           new ScribanChangeNpcStateActionRenderer(cachedDbAccess, scribanLanguageKeyGenerator, localizerFactory, true)));
            _actionRenderes.Add(ActionType.ChangeNpcState, new ActionRendererDispatcher(TemplateType.TaleActionSetNpcState, defaultTemplateProvider,
                                                                                        new ChangeNpcStateActionRenderer(defaultTemplateProvider, cachedDbAccess, languageKeyGenerator, localizerFactory, false),
                                                                                        new ScribanChangeNpcStateActionRenderer(cachedDbAccess, scribanLanguageKeyGenerator, localizerFactory, false)));
            _actionRenderes.Add(ActionType.ChangeTargetNpcState, new ActionRendererDispatcher(TemplateType.TaleActionSetTargetNpcState, defaultTemplateProvider,
                                                                                              new ChangeTargetNpcStateActionRenderer(defaultTemplateProvider, cachedDbAccess, languageKeyGenerator, localizerFactory),
                                                                                              new ScribanChangeTargetNpcStateActionRenderer(cachedDbAccess, scribanLanguageKeyGenerator, localizerFactory)));
            _actionRenderes.Add(ActionType.PlayerLearnSkill, new ActionRendererDispatcher(TemplateType.TaleActionPlayerLearnSkill, defaultTemplateProvider,
                                                                                          new LearnForgetSkillActionRenderer(defaultTemplateProvider, cachedDbAccess, languageKeyGenerator, localizerFactory, true, true),
                                                                                          new ScribanLearnForgetSkillActionRenderer(cachedDbAccess, scribanLanguageKeyGenerator, localizerFactory, true, true)));
            _actionRenderes.Add(ActionType.PlayerForgetSkill, new ActionRendererDispatcher(TemplateType.TaleActionPlayerForgetSkill, defaultTemplateProvider,
                                                                                           new LearnForgetSkillActionRenderer(defaultTemplateProvider, cachedDbAccess, languageKeyGenerator, localizerFactory, true, false),
                                                                                           new ScribanLearnForgetSkillActionRenderer(cachedDbAccess, scribanLanguageKeyGenerator, localizerFactory, true, false)));
            _actionRenderes.Add(ActionType.NpcLearnSkill, new ActionRendererDispatcher(TemplateType.TaleActionNpcLearnSkill, defaultTemplateProvider,
                                                                                       new LearnForgetSkillActionRenderer(defaultTemplateProvider, cachedDbAccess, languageKeyGenerator, localizerFactory, false, true),
                                                                                       new ScribanLearnForgetSkillActionRenderer(cachedDbAccess, scribanLanguageKeyGenerator, localizerFactory, false, true)));
            _actionRenderes.Add(ActionType.NpcForgetSkill, new ActionRendererDispatcher(TemplateType.TaleActionNpcForgetSkill, defaultTemplateProvider,
                                                                                        new LearnForgetSkillActionRenderer(defaultTemplateProvider, cachedDbAccess, languageKeyGenerator, localizerFactory, false, false),
                                                                                        new ScribanLearnForgetSkillActionRenderer(cachedDbAccess, scribanLanguageKeyGenerator, localizerFactory, false, false)));
            _actionRenderes.Add(ActionType.ChangePlayerSkillValue, new ActionRendererDispatcher(TemplateType.TaleActionChangePlayerSkillValue, defaultTemplateProvider,
                                                                                                new SkillValueChangeRenderer(defaultTemplateProvider, cachedDbAccess, languageKeyGenerator, localizerFactory, true),
                                                                                                new ScribanSkillValueChangeRenderer(defaultTemplateProvider, cachedDbAccess, scribanLanguageKeyGenerator, localizerFactory, true)));
            _actionRenderes.Add(ActionType.ChangeNpcSkillValue, new ActionRendererDispatcher(TemplateType.TaleActionChangeNpcSkillValue, defaultTemplateProvider,
                                                                                             new SkillValueChangeRenderer(defaultTemplateProvider, cachedDbAccess, languageKeyGenerator, localizerFactory, false),
                                                                                             new ScribanSkillValueChangeRenderer(defaultTemplateProvider, cachedDbAccess, scribanLanguageKeyGenerator, localizerFactory, false)));
            _actionRenderes.Add(ActionType.PersistDialogState, new ActionRendererDispatcher(TemplateType.TaleActionPersistDialogState, defaultTemplateProvider,
                                                                                            new PersistDialogStateActionRenderer(),
                                                                                            new ScribanPersistDialogStateActionRenderer(cachedDbAccess)));
            _actionRenderes.Add(ActionType.OpenShop, new ActionRendererDispatcher(TemplateType.TaleActionOpenShop, defaultTemplateProvider,
                                                                                  new OpenShopActionRenderer(),
                                                                                  new ScribanOpenShopActionRenderer(cachedDbAccess)));
            _actionRenderes.Add(ActionType.PlayNpcAnimation, new ActionRendererDispatcher(TemplateType.TaleActionNpcPlayAnimation, defaultTemplateProvider,
                                                                                          new PlayAnimationActionRenderer(defaultTemplateProvider, cachedDbAccess, languageKeyGenerator, localizerFactory, false),
                                                                                          new ScribanPlayAnimationActionRenderer(cachedDbAccess, localizerFactory, false)));
            _actionRenderes.Add(ActionType.PlayPlayerAnimation, new ActionRendererDispatcher(TemplateType.TaleActionPlayerPlayAnimation, defaultTemplateProvider,
                                                                                             new PlayAnimationActionRenderer(defaultTemplateProvider, cachedDbAccess, languageKeyGenerator, localizerFactory, true),
                                                                                             new ScribanPlayAnimationActionRenderer(cachedDbAccess, localizerFactory, true)));
            _actionRenderes.Add(ActionType.CodeAction, new ActionRendererDispatcher(TemplateType.TaleActionCodeAction, defaultTemplateProvider,
                                                                                    new CodeActionRenderer(localizerFactory),
                                                                                    new ScribanCodeActionRenderer(cachedDbAccess, localizerFactory)));
            _actionRenderes.Add(ActionType.ShowFloatingTextAboveNpc, new ActionRendererDispatcher(TemplateType.TaleActionShowFloatingTextAboveNpc, defaultTemplateProvider,
                                                                                                  new ShowFloatingTextAboveNpcActionRenderer(defaultTemplateProvider, cachedDbAccess, languageKeyGenerator, localizerFactory, false),
                                                                                                  new ScribanShowFloatingTextAboveNpcActionRenderer(cachedDbAccess, scribanLanguageKeyGenerator, localizerFactory, false)));
            _actionRenderes.Add(ActionType.ShowFloatingTextAbovePlayer, new ActionRendererDispatcher(TemplateType.TaleActionShowFloatingTextAbovePlayer, defaultTemplateProvider,
                                                                                                     new ShowFloatingTextAboveNpcActionRenderer(defaultTemplateProvider, cachedDbAccess, languageKeyGenerator, localizerFactory, true),
                                                                                                     new ScribanShowFloatingTextAboveNpcActionRenderer(cachedDbAccess, scribanLanguageKeyGenerator, localizerFactory, true)));
            _actionRenderes.Add(ActionType.ShowFloatingTextAboveChooseNpc, new ActionRendererDispatcher(TemplateType.TaleActionShowFloatingTextAboveChooseNpc, defaultTemplateProvider,
                                                                                                        new ShowFloatingTextAboveChooseNpcActionRenderer(defaultTemplateProvider, cachedDbAccess, languageKeyGenerator, localizerFactory),
                                                                                                        new ScribanShowFloatingTextAboveChooseNpcActionRenderer(cachedDbAccess, scribanLanguageKeyGenerator, localizerFactory)));
            _actionRenderes.Add(ActionType.FadeToBlack, new ActionRendererDispatcher(TemplateType.TaleActionFadeToBlack, defaultTemplateProvider,
                                                                                     new FadeToFromBlackRenderer(localizerFactory, true),
                                                                                     new ScribanFadeToFromBlackRenderer(cachedDbAccess, localizerFactory, true)));
            _actionRenderes.Add(ActionType.FadeFromBlack, new ActionRendererDispatcher(TemplateType.TaleActionFadeFromBlack, defaultTemplateProvider,
                                                                                       new FadeToFromBlackRenderer(localizerFactory, false),
                                                                                       new ScribanFadeToFromBlackRenderer(cachedDbAccess, localizerFactory, false)));
            _actionRenderes.Add(ActionType.SetGameTime, new ActionRendererDispatcher(TemplateType.TaleActionSetGameTime, defaultTemplateProvider,
                                                                                     new SetGameTimeActionRenderer(cachedDbAccess, localizerFactory),
                                                                                     new ScribanSetGameTimeActionRenderer(cachedDbAccess, localizerFactory)));
            _actionRenderes.Add(ActionType.DisableDailyRoutineEvent, new ActionRendererDispatcher(TemplateType.TaleActionDisableDailyRoutineEvent, defaultTemplateProvider,
                                                                                                  new SetDailyRoutineEventState(defaultTemplateProvider, cachedDbAccess, legacyDailyRoutineEventPlaceholderResolver, languageKeyGenerator, localizerFactory, true),
                                                                                                  new ScribanSetDailyRoutineEventState(cachedDbAccess, dailyRoutineFunctionNameGenerator, scribanLanguageKeyGenerator, localizerFactory, true)));
            _actionRenderes.Add(ActionType.EnableDailyRoutineEvent, new ActionRendererDispatcher(TemplateType.TaleActionEnableDailyRoutineEvent, defaultTemplateProvider,
                                                                                                 new SetDailyRoutineEventState(defaultTemplateProvider, cachedDbAccess, legacyDailyRoutineEventPlaceholderResolver, languageKeyGenerator, localizerFactory, false),
                                                                                                 new ScribanSetDailyRoutineEventState(cachedDbAccess, dailyRoutineFunctionNameGenerator, scribanLanguageKeyGenerator, localizerFactory, false)));
            _actionRenderes.Add(ActionType.TeleportNpc, new ActionRendererDispatcher(TemplateType.TaleActionTeleportNpc, defaultTemplateProvider,
                                                                                     new MoveNpcActionRenderer(defaultTemplateProvider, cachedDbAccess, languageKeyGenerator, localizerFactory, true, false, false),
                                                                                     new ScribanMoveNpcActionRenderer(cachedDbAccess, scribanLanguageKeyGenerator, localizerFactory, true, false, false)));
            _actionRenderes.Add(ActionType.TeleportPlayer, new ActionRendererDispatcher(TemplateType.TaleActionTeleportPlayer, defaultTemplateProvider,
                                                                                        new MoveNpcActionRenderer(defaultTemplateProvider, cachedDbAccess, languageKeyGenerator, localizerFactory, true, true, false),
                                                                                        new ScribanMoveNpcActionRenderer(cachedDbAccess, scribanLanguageKeyGenerator, localizerFactory, true, true, false)));
            _actionRenderes.Add(ActionType.TeleportChooseNpc, new ActionRendererDispatcher(TemplateType.TaleActionTeleportChooseNpc, defaultTemplateProvider,
                                                                                           new MoveNpcActionRenderer(defaultTemplateProvider, cachedDbAccess, languageKeyGenerator, localizerFactory, true, false, true),
                                                                                           new ScribanMoveNpcActionRenderer(cachedDbAccess, scribanLanguageKeyGenerator, localizerFactory, true, false, true)));
            _actionRenderes.Add(ActionType.WalkNpcToMarker, new ActionRendererDispatcher(TemplateType.TaleActionWalkNpc, defaultTemplateProvider,
                                                                                         new MoveNpcActionRenderer(defaultTemplateProvider, cachedDbAccess, languageKeyGenerator, localizerFactory, false, false, false),
                                                                                         new ScribanMoveNpcActionRenderer(cachedDbAccess, scribanLanguageKeyGenerator, localizerFactory, false, false, false)));
            _actionRenderes.Add(ActionType.WalkChooseNpcToMarker, new ActionRendererDispatcher(TemplateType.TaleActionWalkChooseNpc, defaultTemplateProvider,
                                                                                               new MoveNpcActionRenderer(defaultTemplateProvider, cachedDbAccess, languageKeyGenerator, localizerFactory, false, false, true),
                                                                                               new ScribanMoveNpcActionRenderer(cachedDbAccess, scribanLanguageKeyGenerator, localizerFactory, false, false, true)));
            _actionRenderes.Add(ActionType.TeleportNpcToNpc, new ActionRendererDispatcher(TemplateType.TaleActionTeleportNpcToNpc, defaultTemplateProvider,
                                                                                          new MoveNpcToNpcActionRenderer(defaultTemplateProvider, cachedDbAccess, languageKeyGenerator, localizerFactory, true, false),
                                                                                          new ScribanMoveNpcToNpcActionRenderer(cachedDbAccess, scribanLanguageKeyGenerator, localizerFactory, true, false)));
            _actionRenderes.Add(ActionType.TeleportChooseNpcToNpc, new ActionRendererDispatcher(TemplateType.TaleActionTeleportChooseNpcToNpc, defaultTemplateProvider,
                                                                                                new MoveNpcToNpcActionRenderer(defaultTemplateProvider, cachedDbAccess, languageKeyGenerator, localizerFactory, true, true),
                                                                                                new ScribanMoveNpcToNpcActionRenderer(cachedDbAccess, scribanLanguageKeyGenerator, localizerFactory, true, true)));
            _actionRenderes.Add(ActionType.WalkNpcToNpc, new ActionRendererDispatcher(TemplateType.TaleActionWalkNpcToNpc, defaultTemplateProvider,
                                                                                      new MoveNpcToNpcActionRenderer(defaultTemplateProvider, cachedDbAccess, languageKeyGenerator, localizerFactory, false, false),
                                                                                      new ScribanMoveNpcToNpcActionRenderer(cachedDbAccess, scribanLanguageKeyGenerator, localizerFactory, false, false)));
            _actionRenderes.Add(ActionType.WalkChooseNpcToNpc, new ActionRendererDispatcher(TemplateType.TaleActionWalkChooseNpcToNpc, defaultTemplateProvider,
                                                                                            new MoveNpcToNpcActionRenderer(defaultTemplateProvider, cachedDbAccess, languageKeyGenerator, localizerFactory, false, true),
                                                                                            new ScribanMoveNpcToNpcActionRenderer(cachedDbAccess, scribanLanguageKeyGenerator, localizerFactory, false, true)));
            _actionRenderes.Add(ActionType.SpawnNpcAtMarker, new ActionRendererDispatcher(TemplateType.TaleActionSpawnNpcAtMarker, defaultTemplateProvider,
                                                                                          new SpawnNpcAtMarkerRender(defaultTemplateProvider, cachedDbAccess, languageKeyGenerator, localizerFactory),
                                                                                          new ScribanSpawnNpcActionRenderer(cachedDbAccess, scribanLanguageKeyGenerator, localizerFactory)));
            _actionRenderes.Add(ActionType.SpawnItemAtMarker, new ActionRendererDispatcher(TemplateType.TaleActionSpawnItemAtMarker, defaultTemplateProvider,
                                                                                           new SpawnItemAtMarkerRender(defaultTemplateProvider, cachedDbAccess, languageKeyGenerator, localizerFactory),
                                                                                           new ScribanSpawnItemActionRenderer(cachedDbAccess, scribanLanguageKeyGenerator, localizerFactory)));
            _actionRenderes.Add(ActionType.ChangeItemValue, new ActionRendererDispatcher(TemplateType.TaleActionChangeItemValue, defaultTemplateProvider,
                                                                                         new ItemValueChangeRenderer(defaultTemplateProvider, cachedDbAccess, languageKeyGenerator, localizerFactory),
                                                                                         new ScribanItemValueChangeRenderer(defaultTemplateProvider, cachedDbAccess, scribanLanguageKeyGenerator, localizerFactory)));
            _actionRenderes.Add(ActionType.SpawnItemInChooseNpcInventory, new ActionRendererDispatcher(TemplateType.TaleActionSpawnItemForChooseNpc, defaultTemplateProvider,
                                                                                                       new InventoryActionChooseNpcRenderer(defaultTemplateProvider, cachedDbAccess, languageKeyGenerator, localizerFactory, false),
                                                                                                       new ScribanInventoryActionChooseNpcRenderer(cachedDbAccess, scribanLanguageKeyGenerator, localizerFactory, false)));
            _actionRenderes.Add(ActionType.RemoveItemFromChooseNpcInventory, new ActionRendererDispatcher(TemplateType.TaleActionRemoveItemFromChooseNpc, defaultTemplateProvider,
                                                                                                          new InventoryActionChooseNpcRenderer(defaultTemplateProvider, cachedDbAccess, languageKeyGenerator, localizerFactory, true),
                                                                                                          new ScribanInventoryActionChooseNpcRenderer(cachedDbAccess, scribanLanguageKeyGenerator, localizerFactory, true)));
            _actionRenderes.Add(ActionType.NpcUseItem, new ActionRendererDispatcher(TemplateType.TaleActionNpcUseItem, defaultTemplateProvider,
                                                                                    new UseItemActionRenderer(defaultTemplateProvider, cachedDbAccess, languageKeyGenerator, localizerFactory, false, false),
                                                                                    new ScribanUseItemActionRenderer(cachedDbAccess, scribanLanguageKeyGenerator, localizerFactory, false, false)));
            _actionRenderes.Add(ActionType.PlayerUseItem, new ActionRendererDispatcher(TemplateType.TaleActionPlayerUseItem, defaultTemplateProvider,
                                                                                       new UseItemActionRenderer(defaultTemplateProvider, cachedDbAccess, languageKeyGenerator, localizerFactory, true, false),
                                                                                       new ScribanUseItemActionRenderer(cachedDbAccess, scribanLanguageKeyGenerator, localizerFactory, true, false)));
            _actionRenderes.Add(ActionType.ChooseNpcUseItem, new ActionRendererDispatcher(TemplateType.TaleActionChooseNpcUseItem, defaultTemplateProvider,
                                                                                          new UseItemActionRenderer(defaultTemplateProvider, cachedDbAccess, languageKeyGenerator, localizerFactory, false, true),
                                                                                          new ScribanUseItemActionRenderer(cachedDbAccess, scribanLanguageKeyGenerator, localizerFactory, false, true)));

            _renderers = new Dictionary <ExportTemplateRenderingEngine, IActionStepRenderer> {
                { ExportTemplateRenderingEngine.Legacy, new LegacyActionStepRenderer(errorCollection, localizerFactory) },
                { ExportTemplateRenderingEngine.Scriban, new ScribanActionStepRenderer(cachedDbAccess, errorCollection, exportSettings, localizerFactory) }
            };
        }
Example #8
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="defaultTemplateProvider">Default Template Provider</param>
 /// <param name="cachedDbAccess">Cached Db Access</param>
 /// <param name="languageKeyGenerator">Language Key Generator</param>
 /// <param name="scribanLanguageKeyGenerator">Scriban language key generator</param>
 /// <param name="conditionRenderer">Condition Renderer</param>
 /// <param name="legacyDailyRoutineEventPlaceholderResolver">Legacy Daily routine event placeholder resolver</param>
 /// <param name="dailyRoutineFunctionNameGenerator">Daily routine function name generator</param>
 /// <param name="actionTranslator">Action translator</param>
 /// <param name="stringLocalizerFactory">String Localizer Factor</param>
 public ExportDialogRenderer(ICachedExportDefaultTemplateProvider defaultTemplateProvider, IExportCachedDbAccess cachedDbAccess, ILanguageKeyGenerator languageKeyGenerator,
                             IScribanLanguageKeyGenerator scribanLanguageKeyGenerator, IConditionRenderer conditionRenderer, ILegacyDailyRoutineEventPlaceholderResolver legacyDailyRoutineEventPlaceholderResolver,
                             IDailyRoutineFunctionNameGenerator dailyRoutineFunctionNameGenerator, IActionTranslator actionTranslator, IStringLocalizerFactory stringLocalizerFactory) :
     base(defaultTemplateProvider, cachedDbAccess, languageKeyGenerator, scribanLanguageKeyGenerator, conditionRenderer, legacyDailyRoutineEventPlaceholderResolver, dailyRoutineFunctionNameGenerator, actionTranslator, stringLocalizerFactory)
 {
     _localizer = stringLocalizerFactory.Create(typeof(ExportDialogRenderer));
 }
Example #9
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="defaultTemplateProvider">Default Template Provider</param>
        /// <param name="cachedDbAccess">Cached Db Access</param>
        /// <param name="dailyRoutineFunctionNameGenerator">Daily routine function name generator</param>
        /// <param name="dailyRoutineEventPlaceholderResolver">Legacy Daily routine event placeholder resolver</param>
        /// <param name="scribanLanguageKeyGenerator">Scriban language key generator</param>
        /// <param name="languageKeyGenerator">Language Key Generator</param>
        /// <param name="conditionTranslator">Condition translator</param>
        /// <param name="localizerFactory">Localizer Factory</param>
        public ConditionRenderer(ICachedExportDefaultTemplateProvider defaultTemplateProvider, IExportCachedDbAccess cachedDbAccess, ILegacyDailyRoutineEventPlaceholderResolver dailyRoutineEventPlaceholderResolver,
                                 IDailyRoutineFunctionNameGenerator dailyRoutineFunctionNameGenerator, IScribanLanguageKeyGenerator scribanLanguageKeyGenerator, ILanguageKeyGenerator languageKeyGenerator,
                                 IConditionTranslator conditionTranslator, IStringLocalizerFactory localizerFactory)
        {
            _defaultTemplateProvider = defaultTemplateProvider;
            _conditionTranslator     = conditionTranslator;
            _localizer = localizerFactory.Create(typeof(ConditionRenderer));

            _elementRenderes = new Dictionary <ConditionType, ConditionRendererDispatcher>();
            _elementRenderes.Add(ConditionType.Group, new ConditionRendererDispatcher(TemplateType.GeneralLogicGroup, defaultTemplateProvider,
                                                                                      new GroupConditionResolver(this, defaultTemplateProvider, localizerFactory),
                                                                                      new ScribanGroupConditionRenderer(this, defaultTemplateProvider, cachedDbAccess, localizerFactory)));
            _elementRenderes.Add(ConditionType.PlayerValueCondition, new ConditionRendererDispatcher(TemplateType.TaleConditionPlayerValue, defaultTemplateProvider,
                                                                                                     new NpcValueConditionResolver(defaultTemplateProvider, cachedDbAccess, languageKeyGenerator, localizerFactory, true),
                                                                                                     new ScribanNpcValueConditionRenderer(defaultTemplateProvider, cachedDbAccess, scribanLanguageKeyGenerator, localizerFactory, true)));
            _elementRenderes.Add(ConditionType.NpcValueCondition, new ConditionRendererDispatcher(TemplateType.TaleConditionNpcValue, defaultTemplateProvider,
                                                                                                  new NpcValueConditionResolver(defaultTemplateProvider, cachedDbAccess, languageKeyGenerator, localizerFactory, false),
                                                                                                  new ScribanNpcValueConditionRenderer(defaultTemplateProvider, cachedDbAccess, scribanLanguageKeyGenerator, localizerFactory, false)));
            _elementRenderes.Add(ConditionType.PlayerInventoryCondition, new ConditionRendererDispatcher(TemplateType.TaleConditionPlayerInventory, defaultTemplateProvider,
                                                                                                         new InventoryConditionResolver(defaultTemplateProvider, cachedDbAccess, languageKeyGenerator, localizerFactory),
                                                                                                         new ScribanInventoryConditionRenderer(defaultTemplateProvider, cachedDbAccess, scribanLanguageKeyGenerator, localizerFactory, true)));
            _elementRenderes.Add(ConditionType.NpcInventoryCondition, new ConditionRendererDispatcher(TemplateType.TaleConditionNpcInventory, defaultTemplateProvider,
                                                                                                      new InventoryConditionResolver(defaultTemplateProvider, cachedDbAccess, languageKeyGenerator, localizerFactory),
                                                                                                      new ScribanInventoryConditionRenderer(defaultTemplateProvider, cachedDbAccess, scribanLanguageKeyGenerator, localizerFactory, false)));
            _elementRenderes.Add(ConditionType.ChooseQuestValueCondition, new ConditionRendererDispatcher(TemplateType.TaleConditionQuestValue, defaultTemplateProvider,
                                                                                                          new QuestValueConditionResolver(defaultTemplateProvider, cachedDbAccess, languageKeyGenerator, localizerFactory),
                                                                                                          new ScribanQuestValueConditionRenderer(defaultTemplateProvider, cachedDbAccess, scribanLanguageKeyGenerator, localizerFactory)));
            _elementRenderes.Add(ConditionType.QuestStateCondition, new ConditionRendererDispatcher(TemplateType.TaleConditionQuestState, defaultTemplateProvider,
                                                                                                    new QuestStateConditionResolver(defaultTemplateProvider, cachedDbAccess, languageKeyGenerator, localizerFactory),
                                                                                                    new ScribanQuestStateConditionRenderer(cachedDbAccess, scribanLanguageKeyGenerator, localizerFactory)));
            _elementRenderes.Add(ConditionType.NpcAliveStateCondition, new ConditionRendererDispatcher(TemplateType.TaleConditionNpcAliveState, defaultTemplateProvider,
                                                                                                       new NpcAliveStateConditionResolver(defaultTemplateProvider, cachedDbAccess, languageKeyGenerator, localizerFactory),
                                                                                                       new ScribanNpcAliveStateConditionRenderer(cachedDbAccess, scribanLanguageKeyGenerator, localizerFactory)));
            _elementRenderes.Add(ConditionType.CurrentSkillValueCondition, new ConditionRendererDispatcher(TemplateType.TaleConditionCurrentSkillValue, defaultTemplateProvider,
                                                                                                           new CurrentSkillValueConditionResolver(defaultTemplateProvider, cachedDbAccess, languageKeyGenerator, localizerFactory),
                                                                                                           new ScribanCurrentSkillValueConditionRenderer(defaultTemplateProvider, cachedDbAccess, scribanLanguageKeyGenerator, localizerFactory)));
            _elementRenderes.Add(ConditionType.GameTimeCondition, new ConditionRendererDispatcher(TemplateType.TaleConditionGameTime, defaultTemplateProvider,
                                                                                                  new GameTimeConditionResolver(defaultTemplateProvider, cachedDbAccess, localizerFactory),
                                                                                                  new ScribanGameTimeConditionRenderer(defaultTemplateProvider, cachedDbAccess, localizerFactory)));
            _elementRenderes.Add(ConditionType.PlayerSkillValueCondition, new ConditionRendererDispatcher(TemplateType.TaleConditionPlayerSkillValue, defaultTemplateProvider,
                                                                                                          new SkillValueConditionResolver(defaultTemplateProvider, cachedDbAccess, languageKeyGenerator, localizerFactory),
                                                                                                          new ScribanSkillValueConditionRenderer(defaultTemplateProvider, cachedDbAccess, scribanLanguageKeyGenerator, localizerFactory)));
            _elementRenderes.Add(ConditionType.NpcSkillValueCondition, new ConditionRendererDispatcher(TemplateType.TaleConditionNpcSkillValue, defaultTemplateProvider,
                                                                                                       new SkillValueConditionResolver(defaultTemplateProvider, cachedDbAccess, languageKeyGenerator, localizerFactory),
                                                                                                       new ScribanSkillValueConditionRenderer(defaultTemplateProvider, cachedDbAccess, scribanLanguageKeyGenerator, localizerFactory)));
            _elementRenderes.Add(ConditionType.PlayerLearnedSkillCondition, new ConditionRendererDispatcher(TemplateType.TaleConditionPlayerLearnedSkill, defaultTemplateProvider,
                                                                                                            new LearnedSkillConditionResolver(defaultTemplateProvider, cachedDbAccess, languageKeyGenerator, localizerFactory),
                                                                                                            new ScribanLearnedSkillConditionRenderer(defaultTemplateProvider, cachedDbAccess, scribanLanguageKeyGenerator, localizerFactory, true)));
            _elementRenderes.Add(ConditionType.PlayerNotLearnedSkillCondition, new ConditionRendererDispatcher(TemplateType.TaleConditionPlayerNotLearnedSkill, defaultTemplateProvider,
                                                                                                               new LearnedSkillConditionResolver(defaultTemplateProvider, cachedDbAccess, languageKeyGenerator, localizerFactory),
                                                                                                               new ScribanLearnedSkillConditionRenderer(defaultTemplateProvider, cachedDbAccess, scribanLanguageKeyGenerator, localizerFactory, true)));
            _elementRenderes.Add(ConditionType.NpcLearnedSkillCondition, new ConditionRendererDispatcher(TemplateType.TaleConditionNpcLearnedSkill, defaultTemplateProvider,
                                                                                                         new LearnedSkillConditionResolver(defaultTemplateProvider, cachedDbAccess, languageKeyGenerator, localizerFactory),
                                                                                                         new ScribanLearnedSkillConditionRenderer(defaultTemplateProvider, cachedDbAccess, scribanLanguageKeyGenerator, localizerFactory, false)));
            _elementRenderes.Add(ConditionType.NpcNotLearnedSkillCondition, new ConditionRendererDispatcher(TemplateType.TaleConditionNpcNotLearnedSkill, defaultTemplateProvider,
                                                                                                            new LearnedSkillConditionResolver(defaultTemplateProvider, cachedDbAccess, languageKeyGenerator, localizerFactory),
                                                                                                            new ScribanLearnedSkillConditionRenderer(defaultTemplateProvider, cachedDbAccess, scribanLanguageKeyGenerator, localizerFactory, false)));
            _elementRenderes.Add(ConditionType.RandomValueCondition, new ConditionRendererDispatcher(TemplateType.TaleConditionRandomValue, defaultTemplateProvider,
                                                                                                     new RandomValueConditionResolver(defaultTemplateProvider, localizerFactory),
                                                                                                     new ScribanRandomValueConditionRenderer(cachedDbAccess, defaultTemplateProvider, localizerFactory)));
            _elementRenderes.Add(ConditionType.DailyRoutineEventIsDisabledCondition, new ConditionRendererDispatcher(TemplateType.TaleConditionDailyRoutineEventDisabled, defaultTemplateProvider,
                                                                                                                     new DailyRoutineEventStateConditionResolver(defaultTemplateProvider, cachedDbAccess, dailyRoutineEventPlaceholderResolver, languageKeyGenerator, localizerFactory),
                                                                                                                     new ScribanDailyRoutineEventStateConditionRenderer(cachedDbAccess, dailyRoutineFunctionNameGenerator, scribanLanguageKeyGenerator, localizerFactory)));
            _elementRenderes.Add(ConditionType.DailyRoutineEventIsEnabledCondition, new ConditionRendererDispatcher(TemplateType.TaleConditionDailyRoutineEventEnabled, defaultTemplateProvider,
                                                                                                                    new DailyRoutineEventStateConditionResolver(defaultTemplateProvider, cachedDbAccess, dailyRoutineEventPlaceholderResolver, languageKeyGenerator, localizerFactory),
                                                                                                                    new ScribanDailyRoutineEventStateConditionRenderer(cachedDbAccess, dailyRoutineFunctionNameGenerator, scribanLanguageKeyGenerator, localizerFactory)));
            _elementRenderes.Add(ConditionType.CodeCondition, new ConditionRendererDispatcher(TemplateType.TaleConditionCode, defaultTemplateProvider,
                                                                                              new CodeConditionResolver(localizerFactory),
                                                                                              new ScribanCodeConditionRenderer(cachedDbAccess, localizerFactory)));
            _elementRenderes.Add(ConditionType.ItemValueCondition, new ConditionRendererDispatcher(TemplateType.TaleConditionItemValue, defaultTemplateProvider,
                                                                                                   new ItemValueConditionResolver(defaultTemplateProvider, cachedDbAccess, languageKeyGenerator, localizerFactory),
                                                                                                   new ScribanItemValueConditionRenderer(defaultTemplateProvider, cachedDbAccess, scribanLanguageKeyGenerator, localizerFactory)));
        }
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="defaultTemplateProvider">Default Template Provider</param>
 /// <param name="cachedDbAccess">Cached Db Access</param>
 /// <param name="dailyRoutineEventPlaceholderResolver">Daily Rotuine event placeholder resolver</param>
 /// <param name="languageKeyGenerator">Language Key Generator</param>
 /// <param name="localizerFactory">Localizer Factory</param>
 /// <param name="isDisable">true if the event is for a disable action</param>
 public SetDailyRoutineEventState(ICachedExportDefaultTemplateProvider defaultTemplateProvider, IExportCachedDbAccess cachedDbAccess, ILegacyDailyRoutineEventPlaceholderResolver dailyRoutineEventPlaceholderResolver, ILanguageKeyGenerator languageKeyGenerator, IStringLocalizerFactory localizerFactory, bool isDisable) :
     base(cachedDbAccess, isDisable)
 {
     _dailyRoutineEventPlaceholderResolver = dailyRoutineEventPlaceholderResolver;
     _flexFieldPlaceholderResolver         = new FlexFieldExportTemplatePlaceholderResolver(defaultTemplateProvider, cachedDbAccess, languageKeyGenerator, localizerFactory, NpcPlaceholderPrefix);
 }