added session loss sequence, added energy and stamina to HUD, added home location trigger
This commit is contained in:
@@ -110,6 +110,21 @@ FText UCommissionObjective::GetDescription() const
|
||||
return FText::GetEmpty();
|
||||
}
|
||||
|
||||
FText UCommissionObjective::GetConstraintsDescription() const
|
||||
{
|
||||
TArray<FString> Parts;
|
||||
for (const UCommissionConstraint* Constraint : Constraints)
|
||||
{
|
||||
if (!Constraint)
|
||||
continue;
|
||||
|
||||
const FString Text = Constraint->GetDescription().ToString();
|
||||
if (!Text.IsEmpty())
|
||||
Parts.Add(Text);
|
||||
}
|
||||
return FText::FromString(FString::Join(Parts, TEXT(", ")));
|
||||
}
|
||||
|
||||
float UCommissionObjective::GetProgress() const
|
||||
{
|
||||
if (bSatisfied)
|
||||
|
||||
@@ -39,6 +39,11 @@ public:
|
||||
UFUNCTION(BlueprintPure)
|
||||
virtual float GetProgress() const;
|
||||
|
||||
// Combined "while Y" text for every attached constraint (e.g. "while at Beach, during Night"),
|
||||
// or empty when the objective is unconstrained. For UI to show alongside GetDescription().
|
||||
UFUNCTION(BlueprintPure)
|
||||
FText GetConstraintsDescription() const;
|
||||
|
||||
protected:
|
||||
UPROPERTY()
|
||||
ANakedDesireCharacter* Player = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user