diff --git a/Content/Luprex/lxGameMode.uasset b/Content/Luprex/lxGameMode.uasset index 18e5a9ca..497fe07b 100644 --- a/Content/Luprex/lxGameMode.uasset +++ b/Content/Luprex/lxGameMode.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2a163b84ceb8c9d277d0684f2a684180f48dcf7a89e5bcd5446407cdf6297469 -size 115740 +oid sha256:ac42935b15f61f76f98a2374bbdc14fffb3eaf765c065c1a03fc77cf2cb6e93c +size 128073 diff --git a/Content/Luprex/lxUtilityMacroLibrary.uasset b/Content/Luprex/lxUtilityMacroLibrary.uasset index dae0839d..6eab6a2a 100644 --- a/Content/Luprex/lxUtilityMacroLibrary.uasset +++ b/Content/Luprex/lxUtilityMacroLibrary.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9a61a047c3119d201dbd2343ea8b700ef67bb4af807cb6003911f0e0e70a9e3f +oid sha256:61be6856048e4253fc33c7c205e63251272941a4bb06c91e99210150dd44a5eb size 19281 diff --git a/Content/Tangibles/tangiblecharacter.uasset b/Content/Tangibles/tangiblecharacter.uasset index 0447b4e3..4d2e606c 100644 --- a/Content/Tangibles/tangiblecharacter.uasset +++ b/Content/Tangibles/tangiblecharacter.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9a90624c1a500217f240a4b5dba083d7d000faf3560af2a0a6c7d15d2ca45e79 -size 335694 +oid sha256:b2d181b23ea00140050105562efb9dea47c6bdc21bcf5479099138fc6889a7a4 +size 334681 diff --git a/Source/Integration/BlueprintErrors.h b/Source/Integration/BlueprintErrors.h index 5bab638d..b7cd6240 100644 --- a/Source/Integration/BlueprintErrors.h +++ b/Source/Integration/BlueprintErrors.h @@ -58,6 +58,11 @@ enum class ElxLogVerbosity : uint8 { /** 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) enum class ElxErrorDisplayDuration : uint8 { diff --git a/Source/Integration/FormatError.cpp b/Source/Integration/FormatError.cpp index 5bbb1aa9..1eaf4e98 100644 --- a/Source/Integration/FormatError.cpp +++ b/Source/Integration/FormatError.cpp @@ -114,7 +114,7 @@ void UK2Node_FormatError::CreateCorrectPins() if (FindPin(DisplayDurationPinName, EGPD_Input) == nullptr) { UEdGraphPin *P = CreatePin(EGPD_Input, UEdGraphSchema_K2::PC_Byte, StaticEnum(), DisplayDurationPinName); - P->DefaultValue = TEXT("No Show"); + P->DefaultValue = TEXT("No_Show"); P->AutogeneratedDefaultValue = P->DefaultValue; } diff --git a/Source/Integration/LuaCall.cpp b/Source/Integration/LuaCall.cpp index 1a8e5876..024ec353 100644 --- a/Source/Integration/LuaCall.cpp +++ b/Source/Integration/LuaCall.cpp @@ -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) { - ALuprexGameModeBase *mode = ALuprexGameModeBase::FromContext(context); - FlxStreamBuffer &sb = mode->LuaCallGetResult(); - if (sb.empty()) return ELpxSimpleDynamicTag::None; - int64_t total_reads = sb.total_reads(); - SimpleDynamicTag tag = sb.read_simple_dynamic_tag(); - sb.unread_to(total_reads); - switch (tag) { - case SimpleDynamicTag::STRING: return ELpxSimpleDynamicTag::String; - case SimpleDynamicTag::TOKEN: return ELpxSimpleDynamicTag::Name; - case SimpleDynamicTag::NUMBER: return ELpxSimpleDynamicTag::Float; - case SimpleDynamicTag::VECTOR: return ELpxSimpleDynamicTag::Vector; - case SimpleDynamicTag::BOOLEAN: return ELpxSimpleDynamicTag::Boolean; - default: return ELpxSimpleDynamicTag::None; - } -} +// ELpxSimpleDynamicTag UlxLuaCallLibrary::LuaCallNextResultType(UObject *context) { +// ALuprexGameModeBase *mode = ALuprexGameModeBase::FromContext(context); +// FlxStreamBuffer &sb = mode->LuaCallGetResult(); +// if (sb.empty()) return ELpxSimpleDynamicTag::None; +// int64_t total_reads = sb.total_reads(); +// SimpleDynamicTag tag = sb.read_simple_dynamic_tag(); +// sb.unread_to(total_reads); +// switch (tag) { +// case SimpleDynamicTag::STRING: return ELpxSimpleDynamicTag::String; +// case SimpleDynamicTag::TOKEN: return ELpxSimpleDynamicTag::Name; +// case SimpleDynamicTag::NUMBER: return ELpxSimpleDynamicTag::Float; +// case SimpleDynamicTag::VECTOR: return ELpxSimpleDynamicTag::Vector; +// case SimpleDynamicTag::BOOLEAN: return ELpxSimpleDynamicTag::Boolean; +// default: return ELpxSimpleDynamicTag::None; +// } +// } ///////////////////////////////////////////////////////////////// // diff --git a/Source/Integration/LuaCall.h b/Source/Integration/LuaCall.h index 764ce8fd..fa1f3819 100644 --- a/Source/Integration/LuaCall.h +++ b/Source/Integration/LuaCall.h @@ -128,69 +128,63 @@ public: // 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); - 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); - 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); - - 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. // - 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); - 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); - 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); - 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); - 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); - 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); - 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); // // 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); - 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); - 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); - 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); - 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); - 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); - 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); }; diff --git a/Source/Integration/LuaCallNode.cpp b/Source/Integration/LuaCallNode.cpp index 23f28dfe..88099bfa 100644 --- a/Source/Integration/LuaCallNode.cpp +++ b/Source/Integration/LuaCallNode.cpp @@ -495,7 +495,7 @@ void UK2Node_LuaCall::GetMenuActions(FBlueprintActionDatabaseRegistrar& ActionRe FText UK2Node_LuaCall::GetMenuCategory() const { - return FEditorCategoryUtils::GetCommonCategory(FCommonEditorCategory::Text); + return FText::FromString(FString(TEXT("Luprex|Lua"))); } diff --git a/Source/Integration/Tangible.cpp b/Source/Integration/Tangible.cpp index 2d5e5a3c..5b721a0b 100644 --- a/Source/Integration/Tangible.cpp +++ b/Source/Integration/Tangible.cpp @@ -142,6 +142,7 @@ void UlxTangible::Destroy() { } UlxTangible *UlxTangible::GetActorTangibleQuiet(AActor *actor) { + if (actor == nullptr) return nullptr; UlxTangibleComponent* comp = actor->GetComponentByClass(); if (comp == nullptr) return nullptr; return comp->Tangible.Get(); @@ -150,7 +151,11 @@ UlxTangible *UlxTangible::GetActorTangibleQuiet(AActor *actor) { UlxTangible *UlxTangible::GetActorTangibleOrLog(AActor *actor) { UlxTangible *tan = GetActorTangibleQuiet(actor); 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; }