Mostly working, double invocation of dialogue progression
This commit is contained in:
@@ -63,6 +63,10 @@ namespace Editor.Dialogue
|
||||
{
|
||||
ProcessSlotNode(slotNode, runtimeNode);
|
||||
}
|
||||
else if (iNode is WaitOnCombination combinationNode)
|
||||
{
|
||||
ProcessCombinationNode(combinationNode, runtimeNode);
|
||||
}
|
||||
}
|
||||
else if (iNode is EndNode)
|
||||
{
|
||||
@@ -226,6 +230,18 @@ namespace Editor.Dialogue
|
||||
GetPortValue<bool>(node.GetInputPortByName("LoopThroughForbiddenItemLines"));
|
||||
}
|
||||
|
||||
// Add new method to process combination nodes
|
||||
private void ProcessCombinationNode(WaitOnCombination node, RuntimeDialogueNode runtimeNode)
|
||||
{
|
||||
runtimeNode.nodeType = RuntimeDialogueNodeType.WaitOnCombination;
|
||||
|
||||
var resultItem = GetPortValue<PickupItemData>(node.GetInputPortByName("RequiredResultItem"));
|
||||
if (resultItem != null)
|
||||
{
|
||||
runtimeNode.combinationResultItemID = resultItem.itemId;
|
||||
}
|
||||
}
|
||||
|
||||
private T GetPortValue<T>(IPort port)
|
||||
{
|
||||
if (port == null) return default(T);
|
||||
|
||||
Reference in New Issue
Block a user