/// <summary> /// Collects the values for an export /// </summary> /// <param name="templateType">Template type</param> /// <param name="parsedTemplate">Parsed scriban template</param> /// <param name="scriptObject">Scriban script object to fill</param> /// <param name="data">Export Data</param> /// <returns>Task</returns> public override async Task CollectValues(TemplateType templateType, Template parsedTemplate, ScriptObject scriptObject, ExportObjectData data) { KortistoNpc inputNpc = data.ExportData[ExportConstants.ExportDataObject] as KortistoNpc; if(inputNpc == null) { return; } _languageKeyGenerator.SetErrorCollection(_errorCollection); List<ScribanExportInventoryItem> items = await LoadInventory(parsedTemplate, inputNpc); scriptObject.AddOrUpdate(ExportConstants.ScribanNpcInventoryObjectKey, items); scriptObject.AddOrUpdate(ExportConstants.ScribanLanguageKeyName, _languageKeyGenerator); }