/// <summary>
        /// Constructor
        /// </summary>
        /// <param name="exportTemplatePlaceholderResolver">Export template placeholder resolver</param>
        /// <param name="exportCachedDbAccess">Export cached database access</param>
        /// <param name="taleDbAccess">Dialog database access</param>
        /// <param name="defaultTemplateProvider">Default template provider</param>
        /// <param name="languageKeyGenerator">Language key generator</param>
        /// <param name="dialogParser">Dialog Parser</param>
        /// <param name="dialogFunctionGenerator">Dialog Function Generator</param>
        /// <param name="dialogRenderer">Dialog Renderer</param>
        /// <param name="dailyRoutineFunctionNameGenerator">Daily routine function name generator</param>
        /// <param name="dailyRoutineFunctionRenderer">Daily routine function renderer</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="languageKeyDbAccess">Language key Database access</param>
        /// <param name="localizerFactory">Localizer Factory</param>
        public ScribanExportTemplatePlaceholderRenderingEngine(IExportTemplatePlaceholderResolver exportTemplatePlaceholderResolver, IExportCachedDbAccess exportCachedDbAccess, ITaleDbAccess taleDbAccess,
                                                               ICachedExportDefaultTemplateProvider defaultTemplateProvider, IScribanLanguageKeyGenerator languageKeyGenerator, IExportDialogParser dialogParser,
                                                               IExportDialogFunctionGenerator dialogFunctionGenerator, IExportDialogRenderer dialogRenderer, IDailyRoutineFunctionNameGenerator dailyRoutineFunctionNameGenerator,
                                                               IDailyRoutineFunctionRenderer dailyRoutineFunctionRenderer, IExportSnippetFunctionRenderer exportSnippetFunctionRenderer,
                                                               IStateMachineFunctionNameGenerator stateMachineFunctionNameGenerator, IStateMachineFunctionRenderer stateMachineFunctionRenderer, ILanguageKeyDbAccess languageKeyDbAccess,
                                                               IStringLocalizerFactory localizerFactory)
        {
            _exportCachedDbAccess = exportCachedDbAccess;
            _localizerFactory     = localizerFactory;

            _exportValueCollectors = new List <IScribanExportValueCollector>
            {
                new NpcExportValueCollector(exportTemplatePlaceholderResolver, exportCachedDbAccess, defaultTemplateProvider, languageKeyGenerator, localizerFactory),
                new ItemExportValueCollector(exportTemplatePlaceholderResolver, exportCachedDbAccess, defaultTemplateProvider, languageKeyGenerator, localizerFactory),
                new SkillExportValueCollector(exportTemplatePlaceholderResolver, exportCachedDbAccess, defaultTemplateProvider, languageKeyGenerator, localizerFactory),
                new AttributeListValueCollector(exportCachedDbAccess, languageKeyGenerator, localizerFactory),
                new InventoryValueCollector(exportCachedDbAccess, languageKeyGenerator, localizerFactory),
                new NpcSkillValueCollector(exportCachedDbAccess, languageKeyGenerator, localizerFactory),
                new DialogValueCollector(exportTemplatePlaceholderResolver, exportCachedDbAccess, defaultTemplateProvider, taleDbAccess, languageKeyGenerator, dialogParser, dialogFunctionGenerator, dialogRenderer, localizerFactory),
                new DialogFunctionValueCollector(localizerFactory),
                new NpcDailyRoutineExportValueCollector(exportTemplatePlaceholderResolver, exportCachedDbAccess, dailyRoutineFunctionNameGenerator, dailyRoutineFunctionRenderer, defaultTemplateProvider, localizerFactory),
                new NpcStateMachineExportValueCollector(exportTemplatePlaceholderResolver, exportCachedDbAccess, stateMachineFunctionNameGenerator, stateMachineFunctionRenderer, defaultTemplateProvider, localizerFactory),
                new StateMachineFunctionValueCollector(localizerFactory),
                new DailyRoutineEventListValueCollector(exportCachedDbAccess, dailyRoutineFunctionNameGenerator, localizerFactory),
                new DailyRoutineFunctionValueCollector(localizerFactory),
                new DailyRoutineFunctionListValueCollector(exportTemplatePlaceholderResolver, exportCachedDbAccess, defaultTemplateProvider, localizerFactory),
                new ExportSnippetValueCollector(exportTemplatePlaceholderResolver, exportCachedDbAccess, exportSnippetFunctionRenderer, defaultTemplateProvider, localizerFactory),
                new ExportSnippetFunctionValueCollector(localizerFactory),
                new LanguageKeyValueCollector(exportCachedDbAccess, languageKeyDbAccess, localizerFactory)
            };
        }
 /// <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="stateMachineFunctionNameGenerator">State Machine function name generator</param>
 /// <param name="stringLocalizerFactory">String Localizer Factor</param>
 public StateMachineFunctionRenderer(ICachedExportDefaultTemplateProvider defaultTemplateProvider, IExportCachedDbAccess cachedDbAccess, ILanguageKeyGenerator languageKeyGenerator, IScribanLanguageKeyGenerator scribanLanguageKeyGenerator,
                                     IConditionRenderer conditionRenderer, ILegacyDailyRoutineEventPlaceholderResolver legacyDailyRoutineEventPlaceholderResolver, IDailyRoutineFunctionNameGenerator dailyRoutineFunctionNameGenerator,
                                     IActionTranslator actionTranslator, INodeGraphParser nodeGraphParser, IStateMachineNodeGraphFunctionGenerator nodeGraphFunctionGenerator, IStateMachineFunctionNameGenerator stateMachineFunctionNameGenerator,
                                     IStringLocalizerFactory stringLocalizerFactory) :
     base(defaultTemplateProvider, cachedDbAccess, languageKeyGenerator, scribanLanguageKeyGenerator, conditionRenderer, legacyDailyRoutineEventPlaceholderResolver, dailyRoutineFunctionNameGenerator, actionTranslator, stringLocalizerFactory)
 {
     _nodeGraphParser                   = nodeGraphParser;
     _nodeGraphFunctionGenerator        = nodeGraphFunctionGenerator;
     _stateMachineFunctionNameGenerator = stateMachineFunctionNameGenerator;
 }
Beispiel #3
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="templatePlaceholderResolver">Template placeholder resolver</param>
 /// <param name="cachedDbAccess">Gecachter Datenzugriff</param>
 /// <param name="stateMachineFunctionNameGenerator">State machine function name generator</param>
 /// <param name="stateMachineFunctionRenderer">State machine function renderer</param>
 /// <param name="defaultTemplateProvider">Default template provider</param>
 /// <param name="localizerFactory">Localizer Factory</param>
 public NpcStateMachineExportValueCollector(IExportTemplatePlaceholderResolver templatePlaceholderResolver, IExportCachedDbAccess cachedDbAccess, IStateMachineFunctionNameGenerator stateMachineFunctionNameGenerator,
                                            IStateMachineFunctionRenderer stateMachineFunctionRenderer, ICachedExportDefaultTemplateProvider defaultTemplateProvider, IStringLocalizerFactory localizerFactory)
 {
     _templatePlaceholderResolver = templatePlaceholderResolver;
     _cachedDbAccess = cachedDbAccess;
     _stateMachineFunctionNameGenerator = stateMachineFunctionNameGenerator;
     _stateMachineFunctionRenderer      = stateMachineFunctionRenderer;
     _defaultTemplateProvider           = defaultTemplateProvider;
     _localizerFactory = localizerFactory;
 }
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="dialogFunctionGenerationConditionProvider">Condition Provider</param>
 /// <param name="functionNameGenerator">Dialog Function Name Generaotr</param>
 public StateMachineNodeGraphFunctionGenerator(IDialogFunctionGenerationConditionProvider dialogFunctionGenerationConditionProvider, IStateMachineFunctionNameGenerator functionNameGenerator) : base(dialogFunctionGenerationConditionProvider)
 {
     _functionNameGenerator = functionNameGenerator;
 }
Beispiel #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="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));
        }