2026-03-04 19:54:13 -05:00
|
|
|
////////////////////////////////////////////////////////////
|
|
|
|
|
//
|
|
|
|
|
// ReadLuaValues.h
|
|
|
|
|
//
|
|
|
|
|
// K2Node that reads typed values from a UlxLuaValues array.
|
|
|
|
|
// Takes a prototype string like "string x, float y, int z"
|
|
|
|
|
// and creates output pins with the appropriate types.
|
|
|
|
|
//
|
|
|
|
|
////////////////////////////////////////////////////////////
|
2026-03-04 17:17:00 -05:00
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "LuprexK2Node.h"
|
|
|
|
|
|
|
|
|
|
#include "ReadLuaValues.generated.h"
|
|
|
|
|
|
|
|
|
|
class FBlueprintActionDatabaseRegistrar;
|
|
|
|
|
class FString;
|
|
|
|
|
class UEdGraph;
|
|
|
|
|
class UObject;
|
|
|
|
|
|
|
|
|
|
UCLASS(MinimalAPI)
|
|
|
|
|
class UK2Node_ReadLuaValues : public UlxK2Node
|
|
|
|
|
{
|
|
|
|
|
GENERATED_BODY()
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
//~ Begin UEdGraphNode Interface.
|
|
|
|
|
virtual void AllocateDefaultPins() override;
|
|
|
|
|
virtual FText GetNodeTitle(ENodeTitleType::Type TitleType) const override;
|
|
|
|
|
virtual bool ShouldShowNodeProperties() const override { return true; }
|
|
|
|
|
virtual void PinDefaultValueChanged(UEdGraphPin* Pin) override;
|
|
|
|
|
virtual FText GetTooltipText() const override;
|
|
|
|
|
virtual FText GetPinDisplayName(const UEdGraphPin* Pin) const override;
|
|
|
|
|
//~ End UEdGraphNode Interface.
|
|
|
|
|
|
|
|
|
|
//~ Begin UK2Node Interface.
|
|
|
|
|
virtual bool IsNodePure() const override { return false; }
|
|
|
|
|
virtual void ReconstructNode() override;
|
|
|
|
|
virtual bool NodeCausesStructuralBlueprintChange() const override { return true; }
|
|
|
|
|
virtual void ExpandNode(class FKismetCompilerContext& CompilerContext, UEdGraph* SourceGraph) override;
|
|
|
|
|
virtual ERedirectType DoPinsMatchForReconstruction(const UEdGraphPin* NewPin, int32 NewPinIndex, const UEdGraphPin* OldPin, int32 OldPinIndex) const override;
|
|
|
|
|
virtual bool IsConnectionDisallowed(const UEdGraphPin* MyPin, const UEdGraphPin* OtherPin, FString& OutReason) const override;
|
|
|
|
|
virtual void GetMenuActions(FBlueprintActionDatabaseRegistrar& ActionRegistrar) const override;
|
|
|
|
|
virtual FText GetMenuCategory() const override;
|
|
|
|
|
virtual int32 GetNodeRefreshPriority() const override { return EBaseNodeRefreshPriority::Low_UsesDependentWildcard; }
|
|
|
|
|
//~ End UK2Node Interface.
|
|
|
|
|
|
|
|
|
|
private:
|
2026-03-04 19:54:13 -05:00
|
|
|
static const FName PrototypePinName;
|
|
|
|
|
static const FName InputValuesPinName;
|
|
|
|
|
static const FName RemainingPinName;
|
2026-03-04 17:17:00 -05:00
|
|
|
static const FName ErrorPinName;
|
|
|
|
|
|
|
|
|
|
private:
|
2026-03-04 19:54:13 -05:00
|
|
|
// Whenever the prototype pin value changes, we call
|
2026-03-04 17:17:00 -05:00
|
|
|
// ReconstructNode, which backs up the value into this
|
|
|
|
|
// property. This cache is needed because during
|
2026-03-04 19:54:13 -05:00
|
|
|
// ReconstructNode, we blow away the prototype pin. The
|
|
|
|
|
// prototype pin is also absent when the node is first
|
2026-03-04 17:17:00 -05:00
|
|
|
// created.
|
|
|
|
|
//
|
|
|
|
|
UPROPERTY()
|
2026-03-04 19:54:13 -05:00
|
|
|
FString ValuePrototype = TEXT("string x, float y, int z");
|
2026-03-04 17:17:00 -05:00
|
|
|
|
|
|
|
|
};
|