Progress toward popping up look-at widgets
This commit is contained in:
BIN
Content/Luprex/lxGameMode.uasset
LFS
BIN
Content/Luprex/lxGameMode.uasset
LFS
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -57,6 +57,11 @@ enum class ElxLogVerbosity : uint8 {
|
|||||||
|
|
||||||
|
|
||||||
/** Display Duration: How long to display an error message in the game's viewport.
|
/** Display Duration: How long to display an error message in the game's viewport.
|
||||||
|
*
|
||||||
|
* Note: I know it is not traditional to use underscores in Unreal
|
||||||
|
* identifiers. However, without the underscores, the symbols aren't
|
||||||
|
* converted to reasonable human-readable names, and that's the whole point
|
||||||
|
* of this enum.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
UENUM(BlueprintType)
|
UENUM(BlueprintType)
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ void UK2Node_FormatError::CreateCorrectPins()
|
|||||||
|
|
||||||
if (FindPin(DisplayDurationPinName, EGPD_Input) == nullptr) {
|
if (FindPin(DisplayDurationPinName, EGPD_Input) == nullptr) {
|
||||||
UEdGraphPin *P = CreatePin(EGPD_Input, UEdGraphSchema_K2::PC_Byte, StaticEnum<ElxErrorDisplayDuration>(), DisplayDurationPinName);
|
UEdGraphPin *P = CreatePin(EGPD_Input, UEdGraphSchema_K2::PC_Byte, StaticEnum<ElxErrorDisplayDuration>(), DisplayDurationPinName);
|
||||||
P->DefaultValue = TEXT("No Show");
|
P->DefaultValue = TEXT("No_Show");
|
||||||
P->AutogeneratedDefaultValue = P->DefaultValue;
|
P->AutogeneratedDefaultValue = P->DefaultValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -228,37 +228,23 @@ void UlxLuaCallLibrary::LuaCallProbe(UObject *context, AActor *place) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void UlxLuaCallLibrary::InvokeEngioMove(UObject *context, const FString &action, const FVector &xyz, double facing) {
|
|
||||||
ALuprexGameModeBase *mode = ALuprexGameModeBase::FromContext(context);
|
|
||||||
FlxStreamBuffer &sb = mode->LuaCallBegin();
|
|
||||||
sb.write_string("engio");
|
|
||||||
sb.write_string("move");
|
|
||||||
sb.write_simple_dynamic_tag(SimpleDynamicTag::STRING);
|
|
||||||
sb.write_string(action);
|
|
||||||
sb.write_simple_dynamic_tag(SimpleDynamicTag::VECTOR);
|
|
||||||
sb.write_fvector(xyz);
|
|
||||||
sb.write_simple_dynamic_tag(SimpleDynamicTag::NUMBER);
|
|
||||||
sb.write_double(facing);
|
|
||||||
mode->LuaCallEnd(InvocationKind::LUA_INVOKE);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
// ELpxSimpleDynamicTag UlxLuaCallLibrary::LuaCallNextResultType(UObject *context) {
|
||||||
ELpxSimpleDynamicTag UlxLuaCallLibrary::LuaCallNextResultType(UObject *context) {
|
// ALuprexGameModeBase *mode = ALuprexGameModeBase::FromContext(context);
|
||||||
ALuprexGameModeBase *mode = ALuprexGameModeBase::FromContext(context);
|
// FlxStreamBuffer &sb = mode->LuaCallGetResult();
|
||||||
FlxStreamBuffer &sb = mode->LuaCallGetResult();
|
// if (sb.empty()) return ELpxSimpleDynamicTag::None;
|
||||||
if (sb.empty()) return ELpxSimpleDynamicTag::None;
|
// int64_t total_reads = sb.total_reads();
|
||||||
int64_t total_reads = sb.total_reads();
|
// SimpleDynamicTag tag = sb.read_simple_dynamic_tag();
|
||||||
SimpleDynamicTag tag = sb.read_simple_dynamic_tag();
|
// sb.unread_to(total_reads);
|
||||||
sb.unread_to(total_reads);
|
// switch (tag) {
|
||||||
switch (tag) {
|
// case SimpleDynamicTag::STRING: return ELpxSimpleDynamicTag::String;
|
||||||
case SimpleDynamicTag::STRING: return ELpxSimpleDynamicTag::String;
|
// case SimpleDynamicTag::TOKEN: return ELpxSimpleDynamicTag::Name;
|
||||||
case SimpleDynamicTag::TOKEN: return ELpxSimpleDynamicTag::Name;
|
// case SimpleDynamicTag::NUMBER: return ELpxSimpleDynamicTag::Float;
|
||||||
case SimpleDynamicTag::NUMBER: return ELpxSimpleDynamicTag::Float;
|
// case SimpleDynamicTag::VECTOR: return ELpxSimpleDynamicTag::Vector;
|
||||||
case SimpleDynamicTag::VECTOR: return ELpxSimpleDynamicTag::Vector;
|
// case SimpleDynamicTag::BOOLEAN: return ELpxSimpleDynamicTag::Boolean;
|
||||||
case SimpleDynamicTag::BOOLEAN: return ELpxSimpleDynamicTag::Boolean;
|
// default: return ELpxSimpleDynamicTag::None;
|
||||||
default: return ELpxSimpleDynamicTag::None;
|
// }
|
||||||
}
|
// }
|
||||||
}
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -128,69 +128,63 @@ public:
|
|||||||
// Functions that do miscellaneous things.
|
// Functions that do miscellaneous things.
|
||||||
//
|
//
|
||||||
|
|
||||||
UFUNCTION(BlueprintCallable, meta = (WorldContext = "context"), Category = "Luprex|Call Lua Function")
|
UFUNCTION(BlueprintCallable, meta = (WorldContext = "context", BlueprintInternalUseOnly = "true"), Category = "Luprex|Call Lua Function")
|
||||||
static void LuaCallBegin(UObject *context, const FString &ClassName, const FString &FunctionName);
|
static void LuaCallBegin(UObject *context, const FString &ClassName, const FString &FunctionName);
|
||||||
|
|
||||||
UFUNCTION(BlueprintCallable, meta = (WorldContext = "context"), Category = "Luprex|Call Lua Function")
|
UFUNCTION(BlueprintCallable, meta = (WorldContext = "context", BlueprintInternalUseOnly = "true"), Category = "Luprex|Call Lua Function")
|
||||||
static void LuaCallInvoke(UObject *context, AActor *Place);
|
static void LuaCallInvoke(UObject *context, AActor *Place);
|
||||||
|
|
||||||
UFUNCTION(BlueprintCallable, meta = (WorldContext = "context"), Category = "Luprex|Call Lua Function")
|
UFUNCTION(BlueprintCallable, meta = (WorldContext = "context", BlueprintInternalUseOnly = "true"), Category = "Luprex|Call Lua Function")
|
||||||
static void LuaCallProbe(UObject *context, AActor *Place);
|
static void LuaCallProbe(UObject *context, AActor *Place);
|
||||||
|
|
||||||
UFUNCTION(BlueprintCallable, meta = (WorldContext = "context"), Category = "Luprex|Call Lua Function")
|
|
||||||
static void InvokeEngioMove(UObject *context, const FString &action, const FVector &xyz, double facing);
|
|
||||||
|
|
||||||
UFUNCTION(BlueprintCallable, meta = (WorldContext = "context"), Category = "Luprex|Call Lua Function")
|
|
||||||
static ELpxSimpleDynamicTag LuaCallNextResultType(UObject *context);
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Functions that pack arguments into the call buffer.
|
// Functions that pack arguments into the call buffer.
|
||||||
//
|
//
|
||||||
|
|
||||||
UFUNCTION(BlueprintCallable, meta = (WorldContext = "context"), Category = "Luprex|Call Lua Function")
|
UFUNCTION(BlueprintCallable, meta = (WorldContext = "context", BlueprintInternalUseOnly = "true"), Category = "Luprex|Call Lua Function")
|
||||||
static void LuaCallArgument_string(UObject *context, const FString &Value);
|
static void LuaCallArgument_string(UObject *context, const FString &Value);
|
||||||
|
|
||||||
UFUNCTION(BlueprintCallable, meta = (WorldContext = "context"), Category = "Luprex|Call Lua Function")
|
UFUNCTION(BlueprintCallable, meta = (WorldContext = "context", BlueprintInternalUseOnly = "true"), Category = "Luprex|Call Lua Function")
|
||||||
static void LuaCallArgument_name(UObject *context, const FName &Value);
|
static void LuaCallArgument_name(UObject *context, const FName &Value);
|
||||||
|
|
||||||
UFUNCTION(BlueprintCallable, meta = (WorldContext = "context"), Category = "Luprex|Call Lua Function")
|
UFUNCTION(BlueprintCallable, meta = (WorldContext = "context", BlueprintInternalUseOnly = "true"), Category = "Luprex|Call Lua Function")
|
||||||
static void LuaCallArgument_float(UObject *context, double Value);
|
static void LuaCallArgument_float(UObject *context, double Value);
|
||||||
|
|
||||||
UFUNCTION(BlueprintCallable, meta = (WorldContext = "context"), Category = "Luprex|Call Lua Function")
|
UFUNCTION(BlueprintCallable, meta = (WorldContext = "context", BlueprintInternalUseOnly = "true"), Category = "Luprex|Call Lua Function")
|
||||||
static void LuaCallArgument_int(UObject *context, int Value);
|
static void LuaCallArgument_int(UObject *context, int Value);
|
||||||
|
|
||||||
UFUNCTION(BlueprintCallable, meta = (WorldContext = "context"), Category = "Luprex|Call Lua Function")
|
UFUNCTION(BlueprintCallable, meta = (WorldContext = "context", BlueprintInternalUseOnly = "true"), Category = "Luprex|Call Lua Function")
|
||||||
static void LuaCallArgument_vector(UObject *context, const FVector &Value);
|
static void LuaCallArgument_vector(UObject *context, const FVector &Value);
|
||||||
|
|
||||||
UFUNCTION(BlueprintCallable, meta = (WorldContext = "context"), Category = "Luprex|Call Lua Function")
|
UFUNCTION(BlueprintCallable, meta = (WorldContext = "context", BlueprintInternalUseOnly = "true"), Category = "Luprex|Call Lua Function")
|
||||||
static void LuaCallArgument_vector2d(UObject *context, const FVector2D &Value);
|
static void LuaCallArgument_vector2d(UObject *context, const FVector2D &Value);
|
||||||
|
|
||||||
UFUNCTION(BlueprintCallable, meta = (WorldContext = "context"), Category = "Luprex|Call Lua Function")
|
UFUNCTION(BlueprintCallable, meta = (WorldContext = "context", BlueprintInternalUseOnly = "true"), Category = "Luprex|Call Lua Function")
|
||||||
static void LuaCallArgument_boolean(UObject *context, bool Value);
|
static void LuaCallArgument_boolean(UObject *context, bool Value);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Functions that extract return values from the return buffer.
|
// Functions that extract return values from the return buffer.
|
||||||
//
|
//
|
||||||
|
|
||||||
UFUNCTION(BlueprintCallable, meta = (WorldContext = "context"), Category = "Luprex|Call Lua Function")
|
UFUNCTION(BlueprintCallable, meta = (WorldContext = "context", BlueprintInternalUseOnly = "true"), Category = "Luprex|Call Lua Function")
|
||||||
static FString LuaCallReturnValue_string(UObject *context);
|
static FString LuaCallReturnValue_string(UObject *context);
|
||||||
|
|
||||||
UFUNCTION(BlueprintCallable, meta = (WorldContext = "context"), Category = "Luprex|Call Lua Function")
|
UFUNCTION(BlueprintCallable, meta = (WorldContext = "context", BlueprintInternalUseOnly = "true"), Category = "Luprex|Call Lua Function")
|
||||||
static FName LuaCallReturnValue_name(UObject *context);
|
static FName LuaCallReturnValue_name(UObject *context);
|
||||||
|
|
||||||
UFUNCTION(BlueprintCallable, meta = (WorldContext = "context"), Category = "Luprex|Call Lua Function")
|
UFUNCTION(BlueprintCallable, meta = (WorldContext = "context", BlueprintInternalUseOnly = "true"), Category = "Luprex|Call Lua Function")
|
||||||
static double LuaCallReturnValue_float(UObject *context);
|
static double LuaCallReturnValue_float(UObject *context);
|
||||||
|
|
||||||
UFUNCTION(BlueprintCallable, meta = (WorldContext = "context"), Category = "Luprex|Call Lua Function")
|
UFUNCTION(BlueprintCallable, meta = (WorldContext = "context", BlueprintInternalUseOnly = "true"), Category = "Luprex|Call Lua Function")
|
||||||
static int LuaCallReturnValue_int(UObject *context);
|
static int LuaCallReturnValue_int(UObject *context);
|
||||||
|
|
||||||
UFUNCTION(BlueprintCallable, meta = (WorldContext = "context"), Category = "Luprex|Call Lua Function")
|
UFUNCTION(BlueprintCallable, meta = (WorldContext = "context", BlueprintInternalUseOnly = "true"), Category = "Luprex|Call Lua Function")
|
||||||
static FVector LuaCallReturnValue_vector(UObject *context);
|
static FVector LuaCallReturnValue_vector(UObject *context);
|
||||||
|
|
||||||
UFUNCTION(BlueprintCallable, meta = (WorldContext = "context"), Category = "Luprex|Call Lua Function")
|
UFUNCTION(BlueprintCallable, meta = (WorldContext = "context", BlueprintInternalUseOnly = "true"), Category = "Luprex|Call Lua Function")
|
||||||
static FVector2D LuaCallReturnValue_vector2d(UObject *context);
|
static FVector2D LuaCallReturnValue_vector2d(UObject *context);
|
||||||
|
|
||||||
UFUNCTION(BlueprintCallable, meta = (WorldContext = "context"), Category = "Luprex|Call Lua Function")
|
UFUNCTION(BlueprintCallable, meta = (WorldContext = "context", BlueprintInternalUseOnly = "true"), Category = "Luprex|Call Lua Function")
|
||||||
static bool LuaCallReturnValue_boolean(UObject *context);
|
static bool LuaCallReturnValue_boolean(UObject *context);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -495,7 +495,7 @@ void UK2Node_LuaCall::GetMenuActions(FBlueprintActionDatabaseRegistrar& ActionRe
|
|||||||
|
|
||||||
FText UK2Node_LuaCall::GetMenuCategory() const
|
FText UK2Node_LuaCall::GetMenuCategory() const
|
||||||
{
|
{
|
||||||
return FEditorCategoryUtils::GetCommonCategory(FCommonEditorCategory::Text);
|
return FText::FromString(FString(TEXT("Luprex|Lua")));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -142,6 +142,7 @@ void UlxTangible::Destroy() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
UlxTangible *UlxTangible::GetActorTangibleQuiet(AActor *actor) {
|
UlxTangible *UlxTangible::GetActorTangibleQuiet(AActor *actor) {
|
||||||
|
if (actor == nullptr) return nullptr;
|
||||||
UlxTangibleComponent* comp = actor->GetComponentByClass<UlxTangibleComponent>();
|
UlxTangibleComponent* comp = actor->GetComponentByClass<UlxTangibleComponent>();
|
||||||
if (comp == nullptr) return nullptr;
|
if (comp == nullptr) return nullptr;
|
||||||
return comp->Tangible.Get();
|
return comp->Tangible.Get();
|
||||||
@@ -150,7 +151,11 @@ UlxTangible *UlxTangible::GetActorTangibleQuiet(AActor *actor) {
|
|||||||
UlxTangible *UlxTangible::GetActorTangibleOrLog(AActor *actor) {
|
UlxTangible *UlxTangible::GetActorTangibleOrLog(AActor *actor) {
|
||||||
UlxTangible *tan = GetActorTangibleQuiet(actor);
|
UlxTangible *tan = GetActorTangibleQuiet(actor);
|
||||||
if (tan == nullptr) {
|
if (tan == nullptr) {
|
||||||
UE_LOG(LogBlueprint, Error, TEXT("Not a luprex tangible: %s"), *actor->GetName());
|
if (actor == nullptr) {
|
||||||
|
UE_LOG(LogBlueprint, Error, TEXT("Not a luprex tangible: passed in a null pointer"));
|
||||||
|
} else {
|
||||||
|
UE_LOG(LogBlueprint, Error, TEXT("Not a luprex tangible: %s"), *actor->GetName());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return tan;
|
return tan;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user