Finished implementing the ReadLuaValues K2Node

This commit is contained in:
2026-03-04 19:54:13 -05:00
parent 78f0f318c5
commit 6d018fc02b
6 changed files with 199 additions and 250 deletions

View File

@@ -232,15 +232,11 @@ void UK2Node_LuaInvoke::ExpandNode(class FKismetCompilerContext& CompilerContext
ThenPin = ChainExecPin(ThenPin, UnpackNode, TEXT("Success"));
}
// If there is an extra results pin, hook it up.
// If there is an extra results pin, pass through the LuaValues object.
if (ParsedProto.ExtraReturnValues)
{
UEdGraphPin *ExtraPin = FindPinChecked(ExtraResultsPinName);
UFunction *DiscardFunc = UlxLuaValues::StaticClass()->FindFunctionByName(TEXT("DiscardBeforeCursor"));
UK2Node_CallFunction *DiscardNode = MakeCallFunctionNode(CompilerContext, SourceGraph, DiscardFunc);
ReturnArrayPin->MakeLinkTo(DiscardNode->FindPinChecked(UEdGraphSchema_K2::PN_Self));
ThenPin = ChainExecPin(ThenPin, DiscardNode, TEXT("Then"));
CompilerContext.MovePinLinksToIntermediate(*ExtraPin, *ReturnArrayPin);
UEdGraphPin *ExtraResultsPin = FindPinChecked(ExtraResultsPinName);
CompilerContext.MovePinLinksToIntermediate(*ExtraResultsPin, *ReturnArrayPin);
}
}