/// <summary> /// Sets the render object base data /// </summary> /// <param name="renderObject">Render object to fill</param> /// <param name="stepData">Step data</param> /// <param name="exportNpc">Npc to export</param> public void SetRenderObjectBaseData(ScribanDialogStepBaseData renderObject, ExportDialogData stepData, ScribanFlexFieldObject exportNpc) { renderObject.NodeId = stepData.Id; renderObject.NodeIndex = stepData.NodeIndex; renderObject.NodeType = stepData.GetNodeType(); renderObject.NodeStepFunctionName = stepData.DialogStepFunctionName; renderObject.NodeObject = exportNpc; }
/// <summary> /// Returns the stept type /// </summary> /// <param name="nextStep">Next Step</param> /// <returns>Step Type</returns> private string GetStepType(ExportDialogData nextStep) { if (nextStep == null) { return(string.Empty); } return(nextStep.GetNodeType().ToLowerInvariant()); }
/// <summary> /// Returns the node type of dailog step /// </summary> /// <param name="dialogData">Dialog data to check</param> /// <param name="errorCollection">Error Collection to send errors to</param> /// <returns>Node type</returns> protected string GetNodeType(ExportDialogData dialogData, ExportPlaceholderErrorCollection errorCollection) { string nodeType = dialogData.GetNodeType(); if (!string.IsNullOrEmpty(nodeType)) { return(nodeType); } errorCollection.AddUnknownDialogStepError(); return("unknown"); }