Add coach queue control to gameplay wrappers

This commit is contained in:
axiomlogicnexus 2026-04-27 04:33:03 +02:00
parent efe45636ec
commit 2f70bdfc4f
4 changed files with 152 additions and 0 deletions

View file

@ -23,8 +23,13 @@ void UHyperTwistTrainingPanelWidget::RefreshTrainingState()
CachedRunSummary = UHyperTwistTrainingRuntimeLibrary::GetActiveTrainingRunSummary(this);
CachedCoachSignals = UHyperTwistTrainingRuntimeLibrary::GetActiveTrainingCoachSignals(this);
CachedCoachBrief = UHyperTwistTrainingRuntimeLibrary::GetActiveTrainingCoachBrief(this);
CachedCoachFollowUpBrief = UHyperTwistTrainingRuntimeLibrary::GetActiveTrainingCoachFollowUpBrief(this);
CachedCoachSessionQueueSummary =
UHyperTwistTrainingRuntimeLibrary::GetActiveTrainingCoachSessionQueueSummary(this);
CachedCoachSessionQueueState =
UHyperTwistTrainingRuntimeLibrary::GetActiveTrainingCoachSessionQueueState(this);
CachedCoachScheduleHorizonSummary =
UHyperTwistTrainingRuntimeLibrary::GetActiveTrainingCoachScheduleHorizonSummary(this);
CachedCoachSchedulePolicySummary =
UHyperTwistTrainingRuntimeLibrary::GetActiveTrainingCoachSchedulePolicySummary(this);
CachedCoachQueueExecutionSummary =
@ -144,6 +149,50 @@ FHyperTwistTrainingRunState UHyperTwistTrainingPanelWidget::StartNextQueuedCoach
return CachedRunState;
}
bool UHyperTwistTrainingPanelWidget::DeferCoachQueueEntry(
const FString& EntryId,
const FString& DeferredUntilUtc,
const FString& DeferralReasonLabel,
const bool bManualReschedule
)
{
const bool bSucceeded = UHyperTwistTrainingRuntimeLibrary::DeferCoachSessionQueueEntry(
this,
EntryId,
DeferredUntilUtc,
DeferralReasonLabel,
bManualReschedule
);
RefreshTrainingState();
return bSucceeded;
}
bool UHyperTwistTrainingPanelWidget::DeferDisplayedCoachQueueEntry(
const FString& DeferredUntilUtc,
const FString& DeferralReasonLabel,
const bool bManualReschedule
)
{
if (CachedCoachPanelState.ActiveQueueEntryId.IsEmpty())
{
return false;
}
return DeferCoachQueueEntry(
CachedCoachPanelState.ActiveQueueEntryId,
DeferredUntilUtc,
DeferralReasonLabel,
bManualReschedule
);
}
bool UHyperTwistTrainingPanelWidget::PromoteCoachQueueEntry(const FString& EntryId)
{
const bool bSucceeded = UHyperTwistTrainingRuntimeLibrary::PromoteCoachSessionQueueEntry(this, EntryId);
RefreshTrainingState();
return bSucceeded;
}
FHyperTwistTrainingRepositoryRoundTripVerification
UHyperTwistTrainingPanelWidget::VerifyTrainingRepositoryRoundTrip()
{

View file

@ -86,8 +86,13 @@ void AHyperTwistTrainingSessionActor::RefreshCachedTrainingState()
CachedRunSummary = UHyperTwistTrainingRuntimeLibrary::GetActiveTrainingRunSummary(this);
CachedCoachSignals = UHyperTwistTrainingRuntimeLibrary::GetActiveTrainingCoachSignals(this);
CachedCoachBrief = UHyperTwistTrainingRuntimeLibrary::GetActiveTrainingCoachBrief(this);
CachedCoachFollowUpBrief = UHyperTwistTrainingRuntimeLibrary::GetActiveTrainingCoachFollowUpBrief(this);
CachedCoachSessionQueueSummary =
UHyperTwistTrainingRuntimeLibrary::GetActiveTrainingCoachSessionQueueSummary(this);
CachedCoachSessionQueueState =
UHyperTwistTrainingRuntimeLibrary::GetActiveTrainingCoachSessionQueueState(this);
CachedCoachScheduleHorizonSummary =
UHyperTwistTrainingRuntimeLibrary::GetActiveTrainingCoachScheduleHorizonSummary(this);
CachedCoachSchedulePolicySummary =
UHyperTwistTrainingRuntimeLibrary::GetActiveTrainingCoachSchedulePolicySummary(this);
CachedCoachQueueExecutionSummary =
@ -156,6 +161,50 @@ FHyperTwistTrainingRunState AHyperTwistTrainingSessionActor::StartNextQueuedCoac
return CachedRunState;
}
bool AHyperTwistTrainingSessionActor::DeferCoachQueueEntry(
const FString& EntryId,
const FString& DeferredUntilUtc,
const FString& DeferralReasonLabel,
const bool bManualReschedule
)
{
const bool bSucceeded = UHyperTwistTrainingRuntimeLibrary::DeferCoachSessionQueueEntry(
this,
EntryId,
DeferredUntilUtc,
DeferralReasonLabel,
bManualReschedule
);
RefreshCachedTrainingState();
return bSucceeded;
}
bool AHyperTwistTrainingSessionActor::DeferDisplayedCoachQueueEntry(
const FString& DeferredUntilUtc,
const FString& DeferralReasonLabel,
const bool bManualReschedule
)
{
if (CachedCoachPanelState.ActiveQueueEntryId.IsEmpty())
{
return false;
}
return DeferCoachQueueEntry(
CachedCoachPanelState.ActiveQueueEntryId,
DeferredUntilUtc,
DeferralReasonLabel,
bManualReschedule
);
}
bool AHyperTwistTrainingSessionActor::PromoteCoachQueueEntry(const FString& EntryId)
{
const bool bSucceeded = UHyperTwistTrainingRuntimeLibrary::PromoteCoachSessionQueueEntry(this, EntryId);
RefreshCachedTrainingState();
return bSucceeded;
}
FHyperTwistTrainingRepositoryRoundTripVerification
AHyperTwistTrainingSessionActor::VerifyRepositoryRoundTrip()
{

View file

@ -44,9 +44,18 @@ public:
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "HyperTwist|Training|Coach")
FHyperTwistCoachBrief CachedCoachBrief;
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "HyperTwist|Training|Coach")
FHyperTwistCoachBrief CachedCoachFollowUpBrief;
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "HyperTwist|Training|Coach")
FHyperTwistCoachSessionQueueSummary CachedCoachSessionQueueSummary;
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "HyperTwist|Training|Coach")
FHyperTwistTrainingCoachSessionQueueState CachedCoachSessionQueueState;
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "HyperTwist|Training|Coach")
FHyperTwistCoachScheduleHorizonSummary CachedCoachScheduleHorizonSummary;
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "HyperTwist|Training|Coach")
FHyperTwistCoachSchedulePolicySummary CachedCoachSchedulePolicySummary;
@ -109,6 +118,24 @@ public:
UFUNCTION(BlueprintCallable, Category = "HyperTwist|Training|Coach")
FHyperTwistTrainingRunState StartNextQueuedCoachRun(int32 MaxCases);
UFUNCTION(BlueprintCallable, Category = "HyperTwist|Training|Coach")
bool DeferCoachQueueEntry(
const FString& EntryId,
const FString& DeferredUntilUtc,
const FString& DeferralReasonLabel,
bool bManualReschedule
);
UFUNCTION(BlueprintCallable, Category = "HyperTwist|Training|Coach")
bool DeferDisplayedCoachQueueEntry(
const FString& DeferredUntilUtc,
const FString& DeferralReasonLabel,
bool bManualReschedule
);
UFUNCTION(BlueprintCallable, Category = "HyperTwist|Training|Coach")
bool PromoteCoachQueueEntry(const FString& EntryId);
UFUNCTION(BlueprintCallable, Category = "HyperTwist|Training")
FHyperTwistTrainingRepositoryRoundTripVerification VerifyTrainingRepositoryRoundTrip();
};

View file

@ -46,9 +46,18 @@ public:
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "HyperTwist|Training|Coach")
FHyperTwistCoachBrief CachedCoachBrief;
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "HyperTwist|Training|Coach")
FHyperTwistCoachBrief CachedCoachFollowUpBrief;
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "HyperTwist|Training|Coach")
FHyperTwistCoachSessionQueueSummary CachedCoachSessionQueueSummary;
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "HyperTwist|Training|Coach")
FHyperTwistTrainingCoachSessionQueueState CachedCoachSessionQueueState;
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "HyperTwist|Training|Coach")
FHyperTwistCoachScheduleHorizonSummary CachedCoachScheduleHorizonSummary;
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "HyperTwist|Training|Coach")
FHyperTwistCoachSchedulePolicySummary CachedCoachSchedulePolicySummary;
@ -111,6 +120,24 @@ public:
UFUNCTION(BlueprintCallable, Category = "HyperTwist|Training|Coach")
FHyperTwistTrainingRunState StartNextQueuedCoachTrainingRun(int32 MaxCases);
UFUNCTION(BlueprintCallable, Category = "HyperTwist|Training|Coach")
bool DeferCoachQueueEntry(
const FString& EntryId,
const FString& DeferredUntilUtc,
const FString& DeferralReasonLabel,
bool bManualReschedule
);
UFUNCTION(BlueprintCallable, Category = "HyperTwist|Training|Coach")
bool DeferDisplayedCoachQueueEntry(
const FString& DeferredUntilUtc,
const FString& DeferralReasonLabel,
bool bManualReschedule
);
UFUNCTION(BlueprintCallable, Category = "HyperTwist|Training|Coach")
bool PromoteCoachQueueEntry(const FString& EntryId);
UFUNCTION(BlueprintCallable, Category = "HyperTwist|Training")
FHyperTwistTrainingRepositoryRoundTripVerification VerifyRepositoryRoundTrip();
};