From 2b899aedc5c48f95982701e86fdbb9cddefa9ec5 Mon Sep 17 00:00:00 2001 From: axiomlogicnexus Date: Fri, 1 May 2026 23:18:17 +0200 Subject: [PATCH] Report imported generated selector choices in summaries --- .../HyperTwistTrainingLibrary.cpp | 13 +++++++++++-- .../HyperTwistTrainingRepositoryLibrary.cpp | 10 ++++++++-- .../HyperTwistTrainingSubsystem.cpp | 3 ++- .../HyperTwistTraining/HyperTwistTrainingLibrary.h | 3 ++- .../HyperTwistTraining/HyperTwistTrainingTypes.h | 12 ++++++++++++ 5 files changed, 35 insertions(+), 6 deletions(-) diff --git a/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingLibrary.cpp b/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingLibrary.cpp index 40ec521..8896cd1 100644 --- a/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingLibrary.cpp +++ b/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingLibrary.cpp @@ -1507,7 +1507,8 @@ FHyperTwistTrainingCaseSelection UHyperTwistTrainingLibrary::SelectNextTrainingC FHyperTwistTrainingSessionSummary UHyperTwistTrainingLibrary::DeriveTrainingSessionSummary( const FHyperTwistTrainingSession& Session, - const TArray& Attempts + const TArray& Attempts, + const FHyperTwistTrainingImportedRuntimeSelectionState& ImportedRuntimeSelectionState ) { FHyperTwistTrainingSessionSummary Summary; @@ -1587,6 +1588,13 @@ FHyperTwistTrainingSessionSummary UHyperTwistTrainingLibrary::DeriveTrainingSess Summary.SuccessRate = static_cast(Summary.SuccessCount) / static_cast(Summary.CompletedAttemptCount); } + if (ImportedRuntimeSelectionState.IsStructurallyValid()) + { + Summary.ImportedRuntimeSurfaceId = ImportedRuntimeSelectionState.SurfaceId; + Summary.ImportedRuntimeSurfaceKind = ImportedRuntimeSelectionState.SurfaceKind; + Summary.ImportedRuntimeSelectorChoices = ImportedRuntimeSelectionState.SelectorChoices; + } + return Summary; } @@ -1907,7 +1915,8 @@ FHyperTwistTrainingRunStepResult UHyperTwistTrainingLibrary::ResolveTrainingRunA StepResult.SessionSummary = DeriveTrainingSessionSummary( StepResult.UpdatedRunState.Session, - StepResult.UpdatedRunState.Attempts + StepResult.UpdatedRunState.Attempts, + StepResult.UpdatedRunState.ImportedRuntimeSelectionState ); return StepResult; } diff --git a/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingRepositoryLibrary.cpp b/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingRepositoryLibrary.cpp index 1c79e37..8ad93f6 100644 --- a/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingRepositoryLibrary.cpp +++ b/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingRepositoryLibrary.cpp @@ -5726,7 +5726,11 @@ namespace HyperTwistTrainingRepositoryLibraryInternal } RunRecord.Session = Session; - RunRecord.Summary = UHyperTwistTrainingLibrary::DeriveTrainingSessionSummary(Session, Attempts); + RunRecord.Summary = UHyperTwistTrainingLibrary::DeriveTrainingSessionSummary( + Session, + Attempts, + FHyperTwistTrainingImportedRuntimeSelectionState() + ); RunRecord.Attempts = Attempts; RunRecord.LastUpdatedAtUtc = Session.EndedAtUtc; RunRecord.bCompleted = true; @@ -5941,8 +5945,10 @@ FHyperTwistTrainingRunRecord UHyperTwistTrainingRepositoryLibrary::BuildRunRecor RunRecord.Session = RunState.Session; RunRecord.Summary = UHyperTwistTrainingLibrary::DeriveTrainingSessionSummary( RunState.Session, - RunState.Attempts + RunState.Attempts, + RunState.ImportedRuntimeSelectionState ); + RunRecord.ImportedRuntimeSelectionState = RunState.ImportedRuntimeSelectionState; RunRecord.Attempts = RunState.Attempts; RunRecord.RemainingCaseIds = RunState.RemainingCaseIds; RunRecord.ReplayId = RunState.ReplayPacket.ReplayId; diff --git a/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingSubsystem.cpp b/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingSubsystem.cpp index 06f859d..22aec8e 100644 --- a/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingSubsystem.cpp +++ b/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingSubsystem.cpp @@ -3120,7 +3120,8 @@ void UHyperTwistTrainingSubsystem::RefreshSummary() ActiveRunSummary = UHyperTwistTrainingLibrary::DeriveTrainingSessionSummary( ActiveRunState.Session, - ActiveRunState.Attempts + ActiveRunState.Attempts, + ActiveRunState.ImportedRuntimeSelectionState ); } diff --git a/UnrealHyperTwist/Source/UnrealHyperTwist/Public/HyperTwistTraining/HyperTwistTrainingLibrary.h b/UnrealHyperTwist/Source/UnrealHyperTwist/Public/HyperTwistTraining/HyperTwistTrainingLibrary.h index c89ac8d..0e0f980 100644 --- a/UnrealHyperTwist/Source/UnrealHyperTwist/Public/HyperTwistTraining/HyperTwistTrainingLibrary.h +++ b/UnrealHyperTwist/Source/UnrealHyperTwist/Public/HyperTwistTraining/HyperTwistTrainingLibrary.h @@ -112,7 +112,8 @@ public: UFUNCTION(BlueprintPure, Category = "HyperTwist|Training") static FHyperTwistTrainingSessionSummary DeriveTrainingSessionSummary( const FHyperTwistTrainingSession& Session, - const TArray& Attempts + const TArray& Attempts, + const FHyperTwistTrainingImportedRuntimeSelectionState& ImportedRuntimeSelectionState ); UFUNCTION(BlueprintPure, Category = "HyperTwist|Training") diff --git a/UnrealHyperTwist/Source/UnrealHyperTwist/Public/HyperTwistTraining/HyperTwistTrainingTypes.h b/UnrealHyperTwist/Source/UnrealHyperTwist/Public/HyperTwistTraining/HyperTwistTrainingTypes.h index e967c0e..ec0d36e 100644 --- a/UnrealHyperTwist/Source/UnrealHyperTwist/Public/HyperTwistTraining/HyperTwistTrainingTypes.h +++ b/UnrealHyperTwist/Source/UnrealHyperTwist/Public/HyperTwistTraining/HyperTwistTrainingTypes.h @@ -774,6 +774,15 @@ struct FHyperTwistTrainingSessionSummary UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") FString LastCompletedAtUtc; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") + FString ImportedRuntimeSurfaceId; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") + FString ImportedRuntimeSurfaceKind; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") + TArray ImportedRuntimeSelectorChoices; }; USTRUCT(BlueprintType) @@ -1225,6 +1234,9 @@ struct FHyperTwistTrainingRunRecord UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") bool bCompleted = false; + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") + FHyperTwistTrainingImportedRuntimeSelectionState ImportedRuntimeSelectionState; + bool IsStructurallyValid() const { return Session.IsStructurallyValid() && Summary.TrainingSessionId == Session.TrainingSessionId;