More work on look-at, split LuaCall into LuaInvoke/LuaProbe
This commit is contained in:
@@ -22,23 +22,12 @@ class FString;
|
||||
class UEdGraph;
|
||||
class UObject;
|
||||
|
||||
UENUM(BlueprintType)
|
||||
enum class ElxInvokeOrProbe : uint8 {
|
||||
|
||||
/* Invoke the lua function: call it on the server, mutating the world state. */
|
||||
Invoke,
|
||||
|
||||
/* Probe the lua function: call it locally, not mutating the world state. */
|
||||
Probe,
|
||||
};
|
||||
|
||||
|
||||
|
||||
//
|
||||
// The Lua Call K2Node.
|
||||
//
|
||||
UCLASS(MinimalAPI)
|
||||
class UK2Node_LuaCall : public UK2Node
|
||||
class UK2Node_LuaInvoke : public UK2Node
|
||||
{
|
||||
GENERATED_UCLASS_BODY()
|
||||
|
||||
@@ -70,12 +59,15 @@ class UK2Node_LuaCall : public UK2Node
|
||||
|
||||
private:
|
||||
|
||||
virtual bool IsInvoke() const { return true; }
|
||||
|
||||
FText MakeTooltip() const;
|
||||
|
||||
/** Create all necessary pins. */
|
||||
void CreateCorrectPins();
|
||||
|
||||
/** Pin Names for the three built-in Pins **/
|
||||
static const FName FunctionPinName;
|
||||
static const FName InvokeOrProbePinName;
|
||||
static const FName PlacePinName;
|
||||
static const FName ExtraResultsPinName;
|
||||
static const FName ErrorPinName;
|
||||
@@ -90,12 +82,18 @@ private:
|
||||
UPROPERTY()
|
||||
FString LuaFunctionPrototype;
|
||||
|
||||
/** Equal to the invoke-or-probe property **/
|
||||
UPROPERTY()
|
||||
FString InvokeOrProbe;
|
||||
|
||||
|
||||
/** Tooltip text for this node. */
|
||||
FText NodeTooltip;
|
||||
};
|
||||
|
||||
UCLASS(MinimalAPI)
|
||||
class UK2Node_LuaProbe : public UK2Node_LuaInvoke
|
||||
{
|
||||
GENERATED_UCLASS_BODY()
|
||||
|
||||
// Setting this flag alters the behavior of LuaInvoke, making it
|
||||
// probe instead of invoke.
|
||||
//
|
||||
virtual bool IsInvoke() const override { return false; }
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user