added session loss sequence, added energy and stamina to HUD, added home location trigger

This commit is contained in:
2026-06-04 18:59:04 +03:00
parent f2fcd42edf
commit 034694695a
26 changed files with 404 additions and 24 deletions
@@ -90,9 +90,15 @@ public:
// §2.4 sleep: fast-forward 8 hours, restore energy, autosave. (The apartment bed
// also routes outside-clothing loss through USessionLossResolver — see §4.4.)
// The skip is animated over SLEEP_TRANSITION_SECONDS — the clock advances a little
// each frame so the sky sweeps smoothly; energy/autosave land when the sweep finishes.
UFUNCTION(BlueprintCallable, Category = "Time")
void Sleep();
// True while the sleep time-lapse is running (BP can hold a dim overlay / lock input).
UFUNCTION(BlueprintPure, Category = "Time")
bool IsSleeping() const { return bSleeping; }
// --- Pause (reason-keyed; the clock runs only while the reason set is empty).
// Note §11.17: the holding-cell cutscene deliberately does NOT pause the clock. ---
UFUNCTION(BlueprintCallable, Category = "Time")
@@ -124,6 +130,9 @@ private:
// bForceSkyPush bypasses the 30fps throttle for discrete jumps (skips / load),
// so the sky snaps to the new time immediately instead of waiting a frame.
void AdvanceClock(double DeltaMinutes, bool bForceSkyPush = false);
// Per-frame driver for the animated sleep sweep; finalizes when the budget is spent.
void TickSleep(float DeltaTime);
void FinishSleep();
void HandleHourBoundary(int32 HourOfDay); // 023
void SetPhase(EDayPhase NewPhase);
void AdvanceCalendarDay();
@@ -142,4 +151,10 @@ private:
EDayPhase CurrentPhase = EDayPhase::Day;
TSet<FName> PauseReasons;
bool bBegunPlay = false;
// Animated sleep state. While bSleeping, Tick drives the clock at SleepMinutesPerRealSecond
// instead of the normal rate, advancing SleepMinutesRemaining in-game minutes total.
bool bSleeping = false;
double SleepMinutesRemaining = 0.0;
double SleepMinutesPerRealSecond = 0.0;
};