Lots of refactoring in LuaCallNode

This commit is contained in:
2026-03-04 02:56:15 -05:00
parent b81a2a8685
commit 1728386f5c
6 changed files with 127 additions and 170 deletions

View File

@@ -1,16 +1,7 @@
#pragma once
#include "Containers/Array.h"
#include "CoreMinimal.h"
#include "EdGraph/EdGraphNode.h"
#include "EdGraph/EdGraphPin.h"
#include "HAL/Platform.h"
#include "Internationalization/Text.h"
#include "K2Node.h"
#include "UObject/NameTypes.h"
#include "UObject/ObjectMacros.h"
#include "UObject/UObjectGlobals.h"
#include "LuprexK2Node.h"
#include "LuaCallNode.generated.h"
@@ -24,14 +15,11 @@ class UObject;
// The Lua Call K2Node.
//
UCLASS(MinimalAPI)
class UK2Node_LuaInvoke : public UK2Node
class UK2Node_LuaInvoke : public UlxK2Node
{
GENERATED_UCLASS_BODY()
//~ Begin UObject Interface
virtual void PostEditChangeProperty(struct FPropertyChangedEvent& PropertyChangedEvent) override;
//~ End UObject Interface
GENERATED_BODY()
public:
//~ Begin UEdGraphNode Interface.
virtual void AllocateDefaultPins() override;
virtual FText GetNodeTitle(ENodeTitleType::Type TitleType) const override;
@@ -62,11 +50,6 @@ private:
static const FName ExtraResultsPinName;
static const FName ErrorPinName;
/** Utility functions for manipulating pin names with prefixes **/
static bool IsPrefix(const UEdGraphPin *Pin, char Prefix);
static FName AddPrefix(const FString &String, char Prefix);
static FString RemovePrefix(FName Name, char Prefix);
private:
/** The lua function prototype, which must be saved as a property **/
UPROPERTY()
@@ -77,7 +60,7 @@ private:
UCLASS(MinimalAPI)
class UK2Node_LuaProbe : public UK2Node_LuaInvoke
{
GENERATED_UCLASS_BODY()
GENERATED_BODY()
// Setting this flag alters the behavior of LuaInvoke, making it
// probe instead of invoke.